On Sun, 18 Aug 2013, Ming Lei wrote:

> > As far as I can see, these don't need to disable interrupts.  All they
> > protect against is the code in usb_sg_wait() and usb_sg_cancel(), which
> > both run in process context.
> 
> Yes.
> 
> > But will lockdep complain if they don't disable interrupts?
> 
> Looks lockdep won't complain because the lock can't be held in
> another hardirq context.

Don't be so sure.  Suppose you have two mass-storage devices, one
connected by EHCI and one connected by UHCI.  The one using UHCI _will_
invoke the completion handler in hardirq context, because uhci-hcd
doesn't support tasklets.

Have you tested this?

> As I mentioned in 00/50, the patchset is basically a mechanical
> change, so one patch can be dropped if anyone reviews and
> concludes it isn't needed.

I'm afraid that it might be needed to keep lockdep happy, not to 
prevent real problems.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to