From: Andrei Vagin Date: Fri, 9 Jun 2017 00:32:29 +0000 (-0700) Subject: fs: don't forget to put old mntns in mntns_install X-Git-Tag: Ubuntu-5.0.0-8.9~4723^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4068367c9ca7b515a209f9c0c8741309a1e90495;p=mirror_ubuntu-disco-kernel.git 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 Signed-off-by: Andrei Vagin Signed-off-by: Al Viro --- 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);