Commit a9c262a3 authored by Dominique Martinet's avatar Dominique Martinet Committed by Yifan Qiao
Browse files

btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()

mainline inclusion
from mainline-v6.9-rc7
commit 9af503d91298c3f2945e73703f0e00995be08c30
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9QGIP
CVE: CVE-2024-35936

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9af503d91298c3f2945e73703f0e00995be08c30

--------------------------------

The previous patch that replaced BUG_ON by error handling forgot to
unlock the mutex in the error path.

Link: https://lore.kernel.org/all/Zh%2fHpAGFqa7YAFuM@duo.ucw.cz


Reported-by: default avatarPavel Machek <pavel@denx.de>
Fixes: 7411055db5ce ("btrfs: handle chunk tree lookup error in btrfs_relocate_sys_chunks()")
CC: stable@vger.kernel.org
Reviewed-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarDominique Martinet <dominique.martinet@atmark-techno.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Conflicts:
        fs/btrfs/volumes.c
[Since commit f3372065(btrfs: rename delete_unused_bgs_mutex to reclaim_bgs_lock)
renames delete_unused_bgs_mutex to reclaim_bgs_lock and we don't merge
this commit because of the conflicts are too much. We use
delete_unused_bgs_mutex instead of reclaim_bgs_lock.
]
Signed-off-by: default avatarYifan Qiao <qiaoyifan@huawei.com>
parent aa01c355
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment