drm/radeon: disable MSI on RV515
[linux-flexiantxendom0.git] / kernel / ptrace.c
index 24d0447..cd22c48 100644 (file)
@@ -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
@@ -532,6 +543,9 @@ static int ptrace_setoptions(struct task_struct *child, unsigned long data)
        if (data & PTRACE_O_TRACEEXIT)
                child->ptrace |= PT_TRACE_EXIT;
 
+       if (data & PTRACE_O_TRACESECCOMP)
+               child->ptrace |= PT_TRACE_SECCOMP;
+
        return (data & ~PTRACE_O_MASK) ? -EINVAL : 0;
 }