Unverified Commit fb5d5e56 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!7714 CVE-2024-35936

Merge Pull Request from: @ci-robot 
 
PR sync from: Yifan Qiao <qiaoyifan4@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/632PS3K6YNGIDRP2RPU6I4I7ERKMTSW2/ 
David Sterba (1):
  btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()

Dominique Martinet (1):
  btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()


-- 
2.39.2
 
https://gitee.com/src-openeuler/kernel/issues/I9QGIP 
 
Link:https://gitee.com/openeuler/kernel/pulls/7714

 

Reviewed-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 10f4f0ab c6aa6112
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3178,7 +3178,18 @@ static int btrfs_relocate_sys_chunks(struct btrfs_fs_info *fs_info)
			mutex_unlock(&fs_info->delete_unused_bgs_mutex);
			goto error;
		}
		BUG_ON(ret == 0); /* Corruption */
		if (ret == 0) {
			/*
			 * On the first search we would find chunk tree with
			 * offset -1, which is not possible. On subsequent
			 * loops this would find an existing item on an invalid
			 * offset (one less than the previous one, wrong
			 * alignment and size).
			 */
			ret = -EUCLEAN;
			mutex_unlock(&fs_info->delete_unused_bgs_mutex);
			goto error;
		}

		ret = btrfs_previous_item(chunk_root, path, key.objectid,
					  key.type);