summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-03-31 20:36:44 +0000
committerjhb <jhb@FreeBSD.org>2005-03-31 20:36:44 +0000
commitc5e6b72803bb1ca8872e69d8aaa0e1357b2d3c7c (patch)
tree4f6b3cb47853bc4f7c73af288ee70e167fecf51f /sys/kern
parent43088e7962846f0dd9be508a00d6eec4e057aa8e (diff)
downloadFreeBSD-src-c5e6b72803bb1ca8872e69d8aaa0e1357b2d3c7c.zip
FreeBSD-src-c5e6b72803bb1ca8872e69d8aaa0e1357b2d3c7c.tar.gz
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_synch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 3f5689a..d86f570 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -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"));
OpenPOWER on IntegriCloud