Don't recursively panic when we call mi_switch() in a critical section,

even though calling mi_switch() after a panic is likely a bug anyway as
the recursive panic only serves to make things worse.
This commit is contained in:
John Baldwin 2005-03-31 20:36:44 +00:00
parent ad942ef63f
commit b80ed61487

View File

@ -287,7 +287,7 @@ mi_switch(int flags, struct thread *newtd)
#endif
KASSERT(td->td_critnest == 1 || (td->td_critnest == 2 &&
(td->td_pflags & TDP_OWEPREEMPT) != 0 && (flags & SW_INVOL) != 0 &&
newtd == NULL),
newtd == NULL) || panicstr,
("mi_switch: switch in a critical section"));
KASSERT((flags & (SW_INVOL | SW_VOL)) != 0,
("mi_switch: switch must be voluntary or involuntary"));