pccbb crashes when detaching (unsafe interrupt handler)
John Baldwin
jhb at FreeBSD.org
Mon Jul 19 06:57:31 PDT 2004
On Saturday 17 July 2004 03:33 pm, Bosko Milekic wrote:
> Brian Feldman wrote:
> >>From currentish kern_intr.c:
> >
> > if ((ih->ih_flags & IH_DEAD) != 0) {
> > mtx_lock(&ithd->it_lock);
> > TAILQ_REMOVE(&ithd->it_handlers, ih,
> > ih_next);
> > wakeup(ih);
> > mtx_unlock(&ithd->it_lock);
> > goto restart;
> > }
> >We add a flag IH_PIN:
> > if ((ih->ih_flags & (IH_DEAD | IH_PIN)) != 0) {
> > if ((ih->ih_flags & IH_DEAD) == 0) {
> > wakeup(ih);
> > continue;
> > }
> > mtx_lock(&ithd->it_lock);
> > TAILQ_REMOVE(&ithd->it_handlers,
> > ih, ih_next);
> > wakeup(ih);
> > mtx_unlock(&ithd->it_lock);
> > goto restart;
> > }
>
> Neither -current nor your version should be holding the ithd lock
> across the wakeup().
Yes, in general there are (low-priority) changes to reduce the assertions for
cv and sleep wakeups to not assert that the condition protecting lock is held
and to change code like this to not hold the lock across the wakeup.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-current
mailing list