Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661843 > unrolled thread

[PATCH] fs: don't forget to put old mntns in mntns_install

Started byAndrei Vagin <avagin@openvz.org>
First post2017-06-09 02:40 +0200
Last post2017-06-09 02:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] fs: don't forget to put old mntns in mntns_install Andrei Vagin <avagin@openvz.org> - 2017-06-09 02:40 +0200

#1661843 — [PATCH] fs: don't forget to put old mntns in mntns_install

FromAndrei Vagin <avagin@openvz.org>
Date2017-06-09 02:40 +0200
Subject[PATCH] fs: don't forget to put old mntns in mntns_install
Message-ID<tQg81-2SS-5@gated-at.bofh.it>
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>
---
 fs/namespace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/namespace.c b/fs/namespace.c
index 8bd3e4d..5a44384 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);
-- 
2.9.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web