Clear intr_nesting_level when an interrupt thread has no more

handlers and wants to exit, so it doesn't panic in exit1()
which malloc()s with M_WAITOK.

Reported by:	Bob Bishop <rb@gid.co.uk>
This commit is contained in:
Jake Burkholder 2001-01-28 17:20:11 +00:00
parent d30293b3ff
commit 07ce8269b1
4 changed files with 4 additions and 0 deletions

View File

@ -704,6 +704,7 @@ inthand_remove(struct intrhand *idesc)
if ((idesc->ih_flags & INTR_FAST) == 0) {
mtx_enter(&sched_lock, MTX_SPIN);
if (ithd->it_proc->p_stat == SWAIT) {
ithd->it_proc->p_intr_nesting_level = 0;
ithd->it_proc->p_stat = SRUN;
setrunqueue(ithd->it_proc);
/*

View File

@ -704,6 +704,7 @@ inthand_remove(struct intrhand *idesc)
if ((idesc->ih_flags & INTR_FAST) == 0) {
mtx_enter(&sched_lock, MTX_SPIN);
if (ithd->it_proc->p_stat == SWAIT) {
ithd->it_proc->p_intr_nesting_level = 0;
ithd->it_proc->p_stat = SRUN;
setrunqueue(ithd->it_proc);
/*

View File

@ -704,6 +704,7 @@ inthand_remove(struct intrhand *idesc)
if ((idesc->ih_flags & INTR_FAST) == 0) {
mtx_enter(&sched_lock, MTX_SPIN);
if (ithd->it_proc->p_stat == SWAIT) {
ithd->it_proc->p_intr_nesting_level = 0;
ithd->it_proc->p_stat = SRUN;
setrunqueue(ithd->it_proc);
/*

View File

@ -704,6 +704,7 @@ inthand_remove(struct intrhand *idesc)
if ((idesc->ih_flags & INTR_FAST) == 0) {
mtx_enter(&sched_lock, MTX_SPIN);
if (ithd->it_proc->p_stat == SWAIT) {
ithd->it_proc->p_intr_nesting_level = 0;
ithd->it_proc->p_stat = SRUN;
setrunqueue(ithd->it_proc);
/*