Skip to content

Commit

Permalink
fs: don't forget to put old mntns in mntns_install
Browse files Browse the repository at this point in the history
Fixes: 4f757f3 ("make sure that mntns_install() doesn't end up with referral for root")
Cc: Al Viro <[email protected]>
Signed-off-by: Andrei Vagin <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
avagin authored and Al Viro committed Jun 15, 2017
1 parent 81be24d commit 4068367
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4068367

Please sign in to comment.