瀏覽代碼

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>
Andrei Vagin 8 年之前
父節點
當前提交
4068367c9c
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/namespace.c

+ 2 - 0
fs/namespace.c

@@ -3488,6 +3488,8 @@ static int mntns_install(struct nsproxy *nsproxy, struct ns_common *ns)
 		return err;
 		return err;
 	}
 	}
 
 
+	put_mnt_ns(old_mnt_ns);
+
 	/* Update the pwd and root */
 	/* Update the pwd and root */
 	set_fs_pwd(fs, &root);
 	set_fs_pwd(fs, &root);
 	set_fs_root(fs, &root);
 	set_fs_root(fs, &root);