summaryrefslogtreecommitdiff
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2012-01-05 12:51:32 -0600
committerClark Williams <williams@redhat.com>2012-01-05 12:51:32 -0600
commitd76fe430665fac3f44ee88958713ecc524fd778d (patch)
tree00206c8b11eb2084d38eeccfe4b41f5e89fb779c /kernel/ptrace.c
parent63076d7f7f7f2650e5d0a4fa5dd2c412a255c237 (diff)
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
Merge commit 'v3.2' into rt-3.2-rt9v3.2-rt9
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 24d04477b257..78ab24a7b0e4 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -96,9 +96,20 @@ void __ptrace_unlink(struct task_struct *child)
*/
if (!(child->flags & PF_EXITING) &&
(child->signal->flags & SIGNAL_STOP_STOPPED ||
- child->signal->group_stop_count))
+ child->signal->group_stop_count)) {
child->jobctl |= JOBCTL_STOP_PENDING;
+ /*
+ * This is only possible if this thread was cloned by the
+ * traced task running in the stopped group, set the signal
+ * for the future reports.
+ * FIXME: we should change ptrace_init_task() to handle this
+ * case.
+ */
+ if (!(child->jobctl & JOBCTL_STOP_SIGMASK))
+ child->jobctl |= SIGSTOP;
+ }
+
/*
* If transition to TASK_STOPPED is pending or in TASK_TRACED, kick
* @child in the butt. Note that @resume should be used iff @child