critical_exit: ignore td_owepreempt if kdb_active is set

calling mi_switch in such a context results in a recursion via
kdb_switch

Suggested by:	jhb
Reviewed by:	jhb
MFC after:	5 weeks
This commit is contained in:
Andriy Gapon 2011-12-04 21:27:41 +00:00
parent 0f60ecdaa4
commit 5e27a60372

View file

@ -200,7 +200,7 @@ critical_exit(void)
if (td->td_critnest == 1) {
td->td_critnest = 0;
if (td->td_owepreempt) {
if (td->td_owepreempt && !kdb_active) {
td->td_critnest = 1;
thread_lock(td);
td->td_critnest--;