diff options
author | Andrei Vagin <avagin@openvz.org> | 2017-06-09 02:32:29 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-15 12:53:05 +0200 |
commit | 4068367c9ca7b515a209f9c0c8741309a1e90495 (patch) | |
tree | ebc92739af39e349cfdab8bfd839c07499232a90 /fs | |
parent | Hang/soft lockup in d_invalidate with simultaneous calls (diff) | |
download | linux-4068367c9ca7b515a209f9c0c8741309a1e90495.tar.xz linux-4068367c9ca7b515a209f9c0c8741309a1e90495.zip |
fs: don't forget to put old mntns in mntns_install
Fixes: 4f757f3cbf54 ("make sure that mntns_install() doesn't end up with referral for root")
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 8bd3e4d448b9..5a4438445bf7 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3488,6 +3488,8 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns) return err; } + put_mnt_ns(old_mnt_ns); + /* Update the pwd and root */ set_fs_pwd(fs, &root); set_fs_root(fs, &root); |