summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-09 19:35:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-09 19:35:41 -0700
commit8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13 (patch)
tree63b15c820bb7d192fbf62e7857c1a8efaecf8d39 /fs
parent601e6bcc4ef02bda2831d5ac8133947b5edf597b (diff)
parent05883eee857eab4693e7d13ebab06716475c5754 (diff)
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()
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 3357c3d65475..ffb13f0562b0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -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)