aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/exit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index d0b7d988f87..e6e01b959a0 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1540,8 +1540,15 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
1540 } 1540 }
1541 1541
1542 /* dead body doesn't have much to contribute */ 1542 /* dead body doesn't have much to contribute */
1543 if (p->exit_state == EXIT_DEAD) 1543 if (unlikely(p->exit_state == EXIT_DEAD)) {
1544 /*
1545 * But do not ignore this task until the tracer does
1546 * wait_task_zombie()->do_notify_parent().
1547 */
1548 if (likely(!ptrace) && unlikely(ptrace_reparented(p)))
1549 wo->notask_error = 0;
1544 return 0; 1550 return 0;
1551 }
1545 1552
1546 /* slay zombie? */ 1553 /* slay zombie? */
1547 if (p->exit_state == EXIT_ZOMBIE) { 1554 if (p->exit_state == EXIT_ZOMBIE) {