aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ptrace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 2dc00298e678..fdb34e86f923 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -99,9 +99,12 @@ int ptrace_check_attach(struct task_struct *child, int kill)
99 * be changed by us so it's not changing right after this. 99 * be changed by us so it's not changing right after this.
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->signal != NULL) {
104 ret = 0; 103 ret = 0;
104 /*
105 * child->sighand can't be NULL, release_task()
106 * does ptrace_unlink() before __exit_signal().
107 */
105 spin_lock_irq(&child->sighand->siglock); 108 spin_lock_irq(&child->sighand->siglock);
106 if (task_is_stopped(child)) 109 if (task_is_stopped(child))
107 child->state = TASK_TRACED; 110 child->state = TASK_TRACED;