aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-03-23 19:43:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:57 -0400
commit45a68628d37222e655219febce9e91b6484789b2 (patch)
tree6acb5c45e8b11022358a1c28691c9b2c75a7df91 /kernel
parentbfdc0b497faa82a0ba2f9dddcf109231dd519fcc (diff)
pid: remove the child_reaper special case in init/main.c
This patchset is a cleanup and a preparation to unshare the pid namespace. These prerequisites prepare for Eric's patchset to give a file descriptor to a namespace and join an existing namespace. This patch: It turns out that the existing assignment in copy_process of the child_reaper can handle the initial assignment of child_reaper we just need to generalize the test in kernel/fork.c Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Serge E. Hallyn <serge@hallyn.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index f2b494d7c55..17aed4378ed 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1296,7 +1296,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1296 tracehook_finish_clone(p, clone_flags, trace); 1296 tracehook_finish_clone(p, clone_flags, trace);
1297 1297
1298 if (thread_group_leader(p)) { 1298 if (thread_group_leader(p)) {
1299 if (clone_flags & CLONE_NEWPID) 1299 if (is_child_reaper(pid))
1300 p->nsproxy->pid_ns->child_reaper = p; 1300 p->nsproxy->pid_ns->child_reaper = p;
1301 1301
1302 p->signal->leader_pid = pid; 1302 p->signal->leader_pid = pid;