Index: kern_switch.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_switch.c,v retrieving revision 1.107 diff -u -r1.107 kern_switch.c --- kern_switch.c 6 Jan 2005 23:35:39 -0000 1.107 +++ kern_switch.c 16 Mar 2005 12:47:47 -0000 @@ -626,6 +626,7 @@ * The new thread should not preempt the current thread if any of the * following conditions are true: * + * - The kernel is in the throes of crashing (panicstr). * - The current thread has a higher (numerically lower) or * equivalent priority. Note that this prevents curthread from * trying to preempt to itself. @@ -651,8 +652,8 @@ ("maybe_preempt: trying to run inhibitted thread")); pri = td->td_priority; cpri = ctd->td_priority; - if (pri >= cpri || cold /* || dumping */ || TD_IS_INHIBITED(ctd) || - td->td_kse->ke_state != KES_THREAD) + if (panicstr != NULL || pri >= cpri || cold /* || dumping */ || + TD_IS_INHIBITED(ctd) || td->td_kse->ke_state != KES_THREAD) return (0); #ifndef FULL_PREEMPTION if (!(pri >= PRI_MIN_ITHD && pri <= PRI_MAX_ITHD) &&