summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_synch.c')
-rw-r--r--sys/kern/kern_synch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index f54c2d1..499b5d1 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -796,6 +796,8 @@ mi_switch()
td->td_state != TDS_RUNNING)
mtx_assert(&Giant, MA_NOTOWNED);
#endif
+ KASSERT(td->td_critnest == 1,
+ ("mi_switch: switch in a critical section"));
/*
* Compute the amount of time during which the current
OpenPOWER on IntegriCloud