mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
fs: drop peer group ids under namespace lock
commitcb2239c198upstream. When cleaning up peer group ids in the failure path we need to make sure to hold on to the namespace lock. Otherwise another thread might just turn the mount from a shared into a non-shared mount concurrently. Link: https://lore.kernel.org/lkml/00000000000088694505f8132d77@google.com Fixes:2a1867219c("fs: add mount_setattr()") Reported-by: syzbot+8ac3859139c685c4f597@syzkaller.appspotmail.com Cc: stable@vger.kernel.org # 5.12+ Message-Id: <20230330-vfs-mount_setattr-propagation-fix-v1-1-37548d91533b@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3caa693781
commit
ddca03d97d
@@ -4180,9 +4180,9 @@ out:
|
||||
unlock_mount_hash();
|
||||
|
||||
if (kattr->propagation) {
|
||||
namespace_unlock();
|
||||
if (err)
|
||||
cleanup_group_ids(mnt, NULL);
|
||||
namespace_unlock();
|
||||
}
|
||||
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user