Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
Linus Torvalds committed May 10, 2019
2 parents 601e6bc + 05883ee commit 8ea5b2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2599,7 +2599,7 @@ static int do_move_mount(struct path *old_path, struct path *new_path)
if (attached && !check_mnt(old))
goto out;

if (!attached && !is_anon_ns(ns))
if (!attached && !(ns && is_anon_ns(ns)))
goto out;

if (old->mnt.mnt_flags & MNT_LOCKED)
Expand Down

0 comments on commit 8ea5b2a

Please sign in to comment.