summaryrefslogtreecommitdiff
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-01-05 02:35:43 (GMT)
committerDavid S. Miller <davem@davemloft.net>2012-01-05 02:35:43 (GMT)
commit117ff42fd43e92d24c6aa6f3e4f0f1e1edada140 (patch)
treec08e1c0357fde481a16489b77feb8f6073faf538 /kernel/ptrace.c
parent1d5783030a14d1b6ee763f63c8136e581f48b365 (diff)
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
downloadlinux-fsl-qoriq-117ff42fd43e92d24c6aa6f3e4f0f1e1edada140.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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 24d0447..78ab24a 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