diff options
-rw-r--r-- | kernel/ptrace.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 296e8105863a..5105f5a6a2ce 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -60,11 +60,15 @@ static void ptrace_untrace(struct task_struct *child) | |||
60 | { | 60 | { |
61 | spin_lock(&child->sighand->siglock); | 61 | spin_lock(&child->sighand->siglock); |
62 | if (task_is_traced(child)) { | 62 | if (task_is_traced(child)) { |
63 | if (child->signal->flags & SIGNAL_STOP_STOPPED) { | 63 | /* |
64 | * If the group stop is completed or in progress, | ||
65 | * this thread was already counted as stopped. | ||
66 | */ | ||
67 | if (child->signal->flags & SIGNAL_STOP_STOPPED || | ||
68 | child->signal->group_stop_count) | ||
64 | __set_task_state(child, TASK_STOPPED); | 69 | __set_task_state(child, TASK_STOPPED); |
65 | } else { | 70 | else |
66 | signal_wake_up(child, 1); | 71 | signal_wake_up(child, 1); |
67 | } | ||
68 | } | 72 | } |
69 | spin_unlock(&child->sighand->siglock); | 73 | spin_unlock(&child->sighand->siglock); |
70 | } | 74 | } |