timers: Fix endless looping between cascade() and internal_add_timer()
[pandora-kernel.git] / kernel / signal.c
index b3f78d0..08e0b97 100644 (file)
@@ -1610,6 +1610,15 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
        BUG_ON(!tsk->ptrace &&
               (tsk->group_leader != tsk || !thread_group_empty(tsk)));
 
+       if (sig != SIGCHLD) {
+               /*
+                * This is only possible if parent == real_parent.
+                * Check if it has changed security domain.
+                */
+               if (tsk->parent_exec_id != tsk->parent->self_exec_id)
+                       sig = SIGCHLD;
+       }
+
        info.si_signo = sig;
        info.si_errno = 0;
        /*
@@ -1994,8 +2003,6 @@ static bool do_signal_stop(int signr)
                 */
                if (!(sig->flags & SIGNAL_STOP_STOPPED))
                        sig->group_exit_code = signr;
-               else
-                       WARN_ON_ONCE(!current->ptrace);
 
                sig->group_stop_count = 0;