]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/exec.c
[PATCH] add child reaper to pid_namespace
[net-next-2.6.git] / fs / exec.c
index 60433e2254a44d692ac53021bd84d40a216f1fa9..12d8cd461b412378fe8d16b8e39c7a330770a649 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -38,6 +38,7 @@
 #include <linux/binfmts.h>
 #include <linux/swap.h>
 #include <linux/utsname.h>
+#include <linux/pid_namespace.h>
 #include <linux/module.h>
 #include <linux/namei.h>
 #include <linux/proc_fs.h>
@@ -620,8 +621,8 @@ static int de_thread(struct task_struct *tsk)
         * Reparenting needs write_lock on tasklist_lock,
         * so it is safe to do it under read_lock.
         */
-       if (unlikely(tsk->group_leader == child_reaper))
-               child_reaper = tsk;
+       if (unlikely(tsk->group_leader == child_reaper(tsk)))
+               tsk->nsproxy->pid_ns->child_reaper = tsk;
 
        zap_other_threads(tsk);
        read_unlock(&tasklist_lock);