diff options
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 94a9992e6fd..fd781b56401 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -1330,7 +1330,10 @@ static int wait_task_stopped(int ptrace, struct task_struct *p, | |||
| 1330 | uid_t uid = 0; /* unneeded, required by compiler */ | 1330 | uid_t uid = 0; /* unneeded, required by compiler */ |
| 1331 | pid_t pid; | 1331 | pid_t pid; |
| 1332 | 1332 | ||
| 1333 | if (!(options & WUNTRACED)) | 1333 | /* |
| 1334 | * Traditionally we see ptrace'd stopped tasks regardless of options. | ||
| 1335 | */ | ||
| 1336 | if (!ptrace && !(options & WUNTRACED)) | ||
| 1334 | return 0; | 1337 | return 0; |
| 1335 | 1338 | ||
| 1336 | exit_code = 0; | 1339 | exit_code = 0; |
| @@ -1548,11 +1551,6 @@ static int ptrace_do_wait(struct task_struct *tsk, int *notask_error, | |||
| 1548 | { | 1551 | { |
| 1549 | struct task_struct *p; | 1552 | struct task_struct *p; |
| 1550 | 1553 | ||
| 1551 | /* | ||
| 1552 | * Traditionally we see ptrace'd stopped tasks regardless of options. | ||
| 1553 | */ | ||
| 1554 | options |= WUNTRACED; | ||
| 1555 | |||
| 1556 | list_for_each_entry(p, &tsk->ptraced, ptrace_entry) { | 1554 | list_for_each_entry(p, &tsk->ptraced, ptrace_entry) { |
| 1557 | int ret = wait_consider_task(tsk, 1, p, notask_error, | 1555 | int ret = wait_consider_task(tsk, 1, p, notask_error, |
| 1558 | type, pid, options, | 1556 | type, pid, options, |
