diff options
author | Oleg Nesterov <[email protected]> | 2014-12-10 15:54:59 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-12-10 17:41:17 -0800 |
commit | 8a1296aea4a319b33c3367ff3805835e949a229f (patch) | |
tree | 81e2f96286e523330c2d698d742899ef3dd1909b | |
parent | c35a7f18a0b237261dad57c9abd3adfa73f315e1 (diff) |
exit: reparent: fix the dead-parent PR_SET_CHILD_SUBREAPER reparenting
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 <[email protected]>
Cc: Aaron Tomlin <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Lennart Poettering <[email protected]>
Cc: Sterling Alexander <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 9a65f10dc9ff..fd38a8f04367 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); } } |