summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/exit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index fd38a8f04367..9babd47a36e2 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -492,7 +492,9 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
zap_pid_ns_processes(pid_ns);
write_lock_irq(&tasklist_lock);
- } else if (father->signal->has_child_subreaper) {
+ }
+
+ if (father->signal->has_child_subreaper) {
struct task_struct *reaper;
/*
@@ -502,7 +504,7 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
* PID namespace. However we still need the check above, see
* http://marc.info/?l=linux-kernel&m=131385460420380
*/
- for (reaper = father->real_parent;
+ for (reaper = father;
reaper != &init_task;
reaper = reaper->real_parent) {
if (same_thread_group(reaper, pid_ns->child_reaper))