aboutsummaryrefslogtreecommitdiffstats
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 628b03ab88a5..2dc00298e678 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -100,8 +100,7 @@ int ptrace_check_attach(struct task_struct *child, int kill)
100 */ 100 */
101 read_lock(&tasklist_lock); 101 read_lock(&tasklist_lock);
102 if ((child->ptrace & PT_PTRACED) && child->parent == current && 102 if ((child->ptrace & PT_PTRACED) && child->parent == current &&
103 (!(child->ptrace & PT_ATTACHED) || child->real_parent != current) 103 child->signal != NULL) {
104 && child->signal != NULL) {
105 ret = 0; 104 ret = 0;
106 spin_lock_irq(&child->sighand->siglock); 105 spin_lock_irq(&child->sighand->siglock);
107 if (task_is_stopped(child)) 106 if (task_is_stopped(child))
@@ -200,8 +199,7 @@ repeat:
200 goto bad; 199 goto bad;
201 200
202 /* Go */ 201 /* Go */
203 task->ptrace |= PT_PTRACED | ((task->real_parent != current) 202 task->ptrace |= PT_PTRACED;
204 ? PT_ATTACHED : 0);
205 if (capable(CAP_SYS_PTRACE)) 203 if (capable(CAP_SYS_PTRACE))
206 task->ptrace |= PT_PTRACE_CAP; 204 task->ptrace |= PT_PTRACE_CAP;
207 205