aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/nsproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/nsproxy.c')
-rw-r--r--kernel/nsproxy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index f74e6c00e26d..034dc2ed13ac 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -74,6 +74,11 @@ static struct nsproxy *create_new_namespaces(unsigned long flags,
74 err = PTR_ERR(new_nsp->uts_ns); 74 err = PTR_ERR(new_nsp->uts_ns);
75 goto out_uts; 75 goto out_uts;
76 } 76 }
77 if (new_nsp->uts_ns != tsk->nsproxy->uts_ns) {
78 put_user_ns(new_nsp->uts_ns->user_ns);
79 new_nsp->uts_ns->user_ns = task_cred_xxx(tsk, user)->user_ns;
80 get_user_ns(new_nsp->uts_ns->user_ns);
81 }
77 82
78 new_nsp->ipc_ns = copy_ipcs(flags, tsk->nsproxy->ipc_ns); 83 new_nsp->ipc_ns = copy_ipcs(flags, tsk->nsproxy->ipc_ns);
79 if (IS_ERR(new_nsp->ipc_ns)) { 84 if (IS_ERR(new_nsp->ipc_ns)) {