[PATCH 1/6] exit: reparent: fix the dead-parent PR_SET_CHILD_SUBREAPER reparenting
From: Oleg Nesterov
Date: Tue Nov 18 2014 - 16:30:23 EST
The ->has_child_subreaper code in find_new_reaper() finds alive
"thread" but returns another "reaper" thread which can be dead.
Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
kernel/exit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/exit.c b/kernel/exit.c
index f773863..31da440 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -512,7 +512,7 @@ static struct task_struct *find_new_reaper(struct task_struct *father)
thread = reaper;
do {
if (!(thread->flags & PF_EXITING))
- return reaper;
+ return thread;
} while_each_thread(reaper, thread);
}
}
--
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/