Fix proc_is_dying() bug
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 Aug 2016 17:27:20 +0000 (10:27 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 3 Aug 2016 17:35:11 +0000 (10:35 -0700)
Bug was added in f10bf40001fe ("Split PROC_DYING into DYING and
DYING_ABORT"), where I missed a "!".

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/schedule.c

index 7590dcd..2490c52 100644 (file)
@@ -418,7 +418,7 @@ static void __run_mcp_ksched(void *arg)
                         * DYING, it'll remain DYING until we decref.  And if there is a
                         * concurrent death, that will spin on the ksched lock (which we
                         * hold, and which protects the proc lists). */
-                       if (proc_is_dying(p))
+                       if (!proc_is_dying(p))
                                add_to_list(p, secondary_mcps);
                        proc_decref(p);                 /* fyi, this may trigger __proc_free */
                        /* need to break: the proc lists may have changed when we unlocked