Clear ke_runq before calling maybe_preempt, this avoids a
KASSERT(ke->ke_runq == NULL) panic when the sched_add is recursively called by maybe_preempt. Reported by: Wojciech A. Koszek < dunstan at freebsd dot czest dot pl >
This commit is contained in:
parent
9cbae6be49
commit
3cbbc973d7
@ -2150,8 +2150,10 @@ activate_it:
|
||||
if (ke->ke_runq == my_ksq->ksq_curr &&
|
||||
td->td_priority < curthread->td_priority) {
|
||||
curthread->td_flags |= TDF_NEEDRESCHED;
|
||||
ke->ke_runq = NULL;
|
||||
if (preemptive && maybe_preempt(td))
|
||||
return;
|
||||
ke->ke_runq = my_ksq->ksq_curr;
|
||||
if (curthread->td_ksegrp->kg_pri_class == PRI_IDLE)
|
||||
td->td_owepreempt = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user