aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/namespace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ipc/namespace.c b/ipc/namespace.c
index 6ed33c05cb66..72c868277793 100644
--- a/ipc/namespace.c
+++ b/ipc/namespace.c
@@ -16,7 +16,7 @@
16 16
17#include "util.h" 17#include "util.h"
18 18
19static struct ipc_namespace *create_ipc_ns(struct task_struct *tsk, 19static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
20 struct ipc_namespace *old_ns) 20 struct ipc_namespace *old_ns)
21{ 21{
22 struct ipc_namespace *ns; 22 struct ipc_namespace *ns;
@@ -46,19 +46,17 @@ static struct ipc_namespace *create_ipc_ns(struct task_struct *tsk,
46 ipcns_notify(IPCNS_CREATED); 46 ipcns_notify(IPCNS_CREATED);
47 register_ipcns_notifier(ns); 47 register_ipcns_notifier(ns);
48 48
49 ns->user_ns = get_user_ns(task_cred_xxx(tsk, user_ns)); 49 ns->user_ns = get_user_ns(user_ns);
50 50
51 return ns; 51 return ns;
52} 52}
53 53
54struct ipc_namespace *copy_ipcs(unsigned long flags, 54struct ipc_namespace *copy_ipcs(unsigned long flags,
55 struct task_struct *tsk) 55 struct user_namespace *user_ns, struct ipc_namespace *ns)
56{ 56{
57 struct ipc_namespace *ns = tsk->nsproxy->ipc_ns;
58
59 if (!(flags & CLONE_NEWIPC)) 57 if (!(flags & CLONE_NEWIPC))
60 return get_ipc_ns(ns); 58 return get_ipc_ns(ns);
61 return create_ipc_ns(tsk, ns); 59 return create_ipc_ns(user_ns, ns);
62} 60}
63 61
64/* 62/*