aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index eb9934a82fc1..1f2c15297f2d 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1514,18 +1514,7 @@ static int wait_task_continued(struct task_struct *p, int noreap,
1514 1514
1515static inline int my_ptrace_child(struct task_struct *p) 1515static inline int my_ptrace_child(struct task_struct *p)
1516{ 1516{
1517 if (!(p->ptrace & PT_PTRACED)) 1517 return p->ptrace & PT_PTRACED;
1518 return 0;
1519 if (!(p->ptrace & PT_ATTACHED))
1520 return 1;
1521 /*
1522 * This child was PTRACE_ATTACH'd. We should be seeing it only if
1523 * we are the attacher. If we are the real parent, this is a race
1524 * inside ptrace_attach. It is waiting for the tasklist_lock,
1525 * which we have to switch the parent links, but has already set
1526 * the flags in p->ptrace.
1527 */
1528 return (p->parent != p->real_parent);
1529} 1518}
1530 1519
1531static long do_wait(pid_t pid, int options, struct siginfo __user *infop, 1520static long do_wait(pid_t pid, int options, struct siginfo __user *infop,