USB/coredump hangs in 8 and 9

Hans Petter Selasky hselasky at c2i.net
Sat Aug 20 17:21:15 UTC 2011


On Saturday 20 August 2011 19:09:02 Andriy Gapon wrote:
> on 20/08/2011 19:54 Hans Petter Selasky said the following:
> > On Saturday 20 August 2011 18:45:57 Andriy Gapon wrote:
> >> SCHEDULER_STOPPED
> > 
> > The USB code needs to check for the SCHEDULER_STOPPED and cold at the
> > present moment. If this state can be set during bootup, and cleared at
> > the same time like "cold", it would be very good.
> 
> Sorry again - not sure if I follow.
> SCHEDULER_STOPPED is supposed to be set on panic and never be reset.  It's
> like a mirror of 'cold' in a sense.

OK. Then you should add a test "&& !SCHEDULER_STOPPED" where I pointed out:

static void
usbd_callback_wrapper(struct usb_xfer_queue *pq)
{
        struct usb_xfer *xfer = pq->curr;
        struct usb_xfer_root *info = xfer->xroot;

        USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED);
        if (!mtx_owned(info->xfer_mtx) && !SCHEDULER_STOPPED) {
                /*
                 * Cases that end up here:
                 *

And also ensure that no mutex asserts can trigger further panics.

--HPS


More information about the freebsd-stable mailing list