mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 21:01:29 +00:00
attach_recursive_mnt() needs to hold vfsmount_lock over set_mnt_shared()
race in mnt_flags update Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
8ad08d8a0c
commit
df1a1ad297
@ -1354,12 +1354,12 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
|
||||
if (err)
|
||||
goto out_cleanup_ids;
|
||||
|
||||
spin_lock(&vfsmount_lock);
|
||||
|
||||
if (IS_MNT_SHARED(dest_mnt)) {
|
||||
for (p = source_mnt; p; p = next_mnt(p, source_mnt))
|
||||
set_mnt_shared(p);
|
||||
}
|
||||
|
||||
spin_lock(&vfsmount_lock);
|
||||
if (parent_path) {
|
||||
detach_mnt(source_mnt, parent_path);
|
||||
attach_mnt(source_mnt, path);
|
||||
|
Loading…
Reference in New Issue
Block a user