diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 19:35:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 19:35:41 -0700 |
commit | 8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13 (patch) | |
tree | 63b15c820bb7d192fbf62e7857c1a8efaecf8d39 | |
parent | 601e6bcc4ef02bda2831d5ac8133947b5edf597b (diff) | |
parent | 05883eee857eab4693e7d13ebab06716475c5754 (diff) | |
download | linux-8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13.tar.gz linux-8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13.tar.bz2 linux-8ea5b2abd07e2280a332bd9c1a7f4dd15b9b6c13.zip |
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()
-rw-r--r-- | fs/namespace.c | 2 |
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) |