From 828797f0296a20222e1a5922434ae9b832b932c4 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 5 May 2003 21:12:36 +0000 Subject: [PATCH] Remove TD_ON_RUNQ() from a check to make sure Giant is not held when calling mi_switch(). The kernel would panic on an earlier KASSERT() in mi_switch() if TD_ON_RUNQ() was true. --- sys/kern/kern_synch.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 914f43ef9c22..d648e9e311e9 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -467,9 +467,7 @@ mi_switch(void) p = td->td_proc; /* XXX */ KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code")); #ifdef INVARIANTS - if (!TD_ON_LOCK(td) && - !TD_ON_RUNQ(td) && - !TD_IS_RUNNING(td)) + if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) mtx_assert(&Giant, MA_NOTOWNED); #endif KASSERT(td->td_critnest == 1,