aboutsummaryrefslogtreecommitdiff
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 628b03ab88a..2dc00298e67 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -100,8 +100,7 @@ int ptrace_check_attach(struct task_struct *child, int kill)
*/
read_lock(&tasklist_lock);
if ((child->ptrace & PT_PTRACED) && child->parent == current &&
- (!(child->ptrace & PT_ATTACHED) || child->real_parent != current)
- && child->signal != NULL) {
+ child->signal != NULL) {
ret = 0;
spin_lock_irq(&child->sighand->siglock);
if (task_is_stopped(child))
@@ -200,8 +199,7 @@ repeat:
goto bad;
/* Go */
- task->ptrace |= PT_PTRACED | ((task->real_parent != current)
- ? PT_ATTACHED : 0);
+ task->ptrace |= PT_PTRACED;
if (capable(CAP_SYS_PTRACE))
task->ptrace |= PT_PTRACE_CAP;