diff options
Diffstat (limited to 'kernel/ns_cgroup.c')
-rw-r--r-- | kernel/ns_cgroup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/ns_cgroup.c b/kernel/ns_cgroup.c index 48d7ed6fc3a4..43c2111cd54d 100644 --- a/kernel/ns_cgroup.c +++ b/kernel/ns_cgroup.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/cgroup.h> | 8 | #include <linux/cgroup.h> |
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/proc_fs.h> | ||
10 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
11 | #include <linux/nsproxy.h> | 12 | #include <linux/nsproxy.h> |
12 | 13 | ||
@@ -24,9 +25,12 @@ static inline struct ns_cgroup *cgroup_to_ns( | |||
24 | struct ns_cgroup, css); | 25 | struct ns_cgroup, css); |
25 | } | 26 | } |
26 | 27 | ||
27 | int ns_cgroup_clone(struct task_struct *task) | 28 | int ns_cgroup_clone(struct task_struct *task, struct pid *pid) |
28 | { | 29 | { |
29 | return cgroup_clone(task, &ns_subsys); | 30 | char name[PROC_NUMBUF]; |
31 | |||
32 | snprintf(name, PROC_NUMBUF, "%d", pid_vnr(pid)); | ||
33 | return cgroup_clone(task, &ns_subsys, name); | ||
30 | } | 34 | } |
31 | 35 | ||
32 | /* | 36 | /* |