]> Zhao Yanbai Git Server - minix.git/commitdiff
Don't allow PM to sys_kill itself, this causes a race with RS calling waitpid during...
authorErik van der Kouwe <erik@minix3.org>
Fri, 18 Jun 2010 13:49:07 +0000 (13:49 +0000)
committerErik van der Kouwe <erik@minix3.org>
Fri, 18 Jun 2010 13:49:07 +0000 (13:49 +0000)
servers/pm/signal.c

index 48da05fa0a0e41e00699d5e1457144cf088daad8..3925f885a2f8cd1b2444785a1a698ebac04aad81 100644 (file)
@@ -363,6 +363,11 @@ int ksig;                  /* non-zero means signal comes from kernel  */
 
   /* Handle system signals for system processes first. */
   if(rmp->mp_flags & PRIV_PROC) {
+       /* Always skip signals for PM (only necessary when broadcasting). */
+       if(rmp->mp_endpoint == PM_PROC_NR) {
+               return;
+       }
+
        /* System signals have always to go through the kernel first to let it
         * pick the right signal manager. If PM is the assigned signal manager,
         * the signal will come back and will actually be processed.
@@ -372,11 +377,6 @@ int ksig;                  /* non-zero means signal comes from kernel  */
                return;
        }
 
-       /* Always skip signals for PM (only necessary when broadcasting). */
-       if(rmp->mp_endpoint == PM_PROC_NR) {
-               return;
-       }
-
        /* Print stacktrace if necessary. */
        if(SIGS_IS_STACKTRACE(signo)) {
                sys_sysctl_stacktrace(rmp->mp_endpoint);