diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 92d38d4da4b1..6ed6a1d552b5 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1380,20 +1380,16 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace, | |||
1380 | 1380 | ||
1381 | /* slay zombie? */ | 1381 | /* slay zombie? */ |
1382 | if (p->exit_state == EXIT_ZOMBIE) { | 1382 | if (p->exit_state == EXIT_ZOMBIE) { |
1383 | /* | ||
1384 | * A zombie ptracee is only visible to its ptracer. | ||
1385 | * Notification and reaping will be cascaded to the real | ||
1386 | * parent when the ptracer detaches. | ||
1387 | */ | ||
1388 | if (likely(!ptrace) && unlikely(p->ptrace)) { | ||
1389 | /* it will become visible, clear notask_error */ | ||
1390 | wo->notask_error = 0; | ||
1391 | return 0; | ||
1392 | } | ||
1393 | |||
1394 | /* we don't reap group leaders with subthreads */ | 1383 | /* we don't reap group leaders with subthreads */ |
1395 | if (!delay_group_leader(p)) | 1384 | if (!delay_group_leader(p)) { |
1396 | return wait_task_zombie(wo, p); | 1385 | /* |
1386 | * A zombie ptracee is only visible to its ptracer. | ||
1387 | * Notification and reaping will be cascaded to the | ||
1388 | * real parent when the ptracer detaches. | ||
1389 | */ | ||
1390 | if (unlikely(ptrace) || likely(!p->ptrace)) | ||
1391 | return wait_task_zombie(wo, p); | ||
1392 | } | ||
1397 | 1393 | ||
1398 | /* | 1394 | /* |
1399 | * Allow access to stopped/continued state via zombie by | 1395 | * Allow access to stopped/continued state via zombie by |