]> Zhao Yanbai Git Server - minix.git/commitdiff
Kernel: fix clearing IPC references resulting in system crash
authorDavid van Moolenbroek <david@minix3.org>
Tue, 18 Jan 2011 10:18:08 +0000 (10:18 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 18 Jan 2011 10:18:08 +0000 (10:18 +0000)
kernel/system.c

index e5e3708753d575a7c146a05e5150bb7f0575b614..fc144095297d85bcccd0a1636b83895821bfe628 100644 (file)
@@ -540,9 +540,9 @@ PRIVATE void clear_ipc(
           }
           xpp = &(*xpp)->p_q_link;             /* proceed to next queued */
       }
-      rc->p_rts_flags &= ~RTS_SENDING;
+      RTS_UNSET(rc, RTS_SENDING);
   }
-  rc->p_rts_flags &= ~RTS_RECEIVING;
+  RTS_UNSET(rc, RTS_RECEIVING);
 }
 
 /*===========================================================================*
@@ -600,7 +600,7 @@ int caller_ret;                             /* code to return on callers */
       /* Check if process depends on given process. */
       if (P_BLOCKEDON(rp) == rc->p_endpoint) {
           rp->p_reg.retreg = caller_ret;       /* return requested code */
-         RTS_UNSET(rp, (RTS_RECEIVING|RTS_SENDING)); /* no longer blocking */
+         clear_ipc(rp);
       }
   }
 }