aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@us.ibm.com>2006-12-08 02:38:01 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:52 -0800
commit84d737866e2babdeab0c6b18ea155c6a649663b8 (patch)
treee504da826174c2804d8c680828800aa680090686 /init
parent[PATCH] use current->nsproxy->pid_ns (diff)
downloadlinux-dev-84d737866e2babdeab0c6b18ea155c6a649663b8.tar.xz
linux-dev-84d737866e2babdeab0c6b18ea155c6a649663b8.zip
[PATCH] add child reaper to pid_namespace
Add a per pid_namespace child-reaper. This is needed so processes are reaped within the same pid space and do not spill over to the parent pid space. Its also needed so containers preserve existing semantic that pid == 1 would reap orphaned children. This is based on Eric Biederman's patch: http://lkml.org/lkml/2006/2/6/285 Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Kirill Korotaev <dev@openvz.org> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c
index 4cdcd06e6d78..036f97c0c34c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -51,6 +51,7 @@
#include <linux/debug_locks.h>
#include <linux/lockdep.h>
#include <linux/utsrelease.h>
+#include <linux/pid_namespace.h>
#include <linux/compile.h>
#include <asm/io.h>
@@ -626,8 +627,6 @@ static int __init initcall_debug_setup(char *str)
}
__setup("initcall_debug", initcall_debug_setup);
-struct task_struct *child_reaper = &init_task;
-
extern initcall_t __initcall_start[], __initcall_end[];
static void __init do_initcalls(void)
@@ -727,7 +726,7 @@ static int init(void * unused)
* assumptions about where in the task array this
* can be found.
*/
- child_reaper = current;
+ init_pid_ns.child_reaper = current;
cad_pid = task_pid(current);