Commit 8ea5b2ab authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs mount fix from Al Viro:
 "Fix for umount -l/mount --move race caught by syzbot yesterday..."

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  do_move_mount(): fix an unsafe use of is_anon_ns()
parents 601e6bcc 05883eee
...@@ -2599,7 +2599,7 @@ static int do_move_mount(struct path *old_path, struct path *new_path) ...@@ -2599,7 +2599,7 @@ static int do_move_mount(struct path *old_path, struct path *new_path)
if (attached && !check_mnt(old)) if (attached && !check_mnt(old))
goto out; goto out;
if (!attached && !is_anon_ns(ns)) if (!attached && !(ns && is_anon_ns(ns)))
goto out; goto out;
if (old->mnt.mnt_flags & MNT_LOCKED) if (old->mnt.mnt_flags & MNT_LOCKED)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment