Am Freitag 29 August 2008 01:00:35 schrieb greg@kroah.com:
I realise it is commented out, but still.
The resume method may sleep. It is documented as such. Thus it can
reenable interrupts. Therefore you can deadlock if you don't use irqrestore.
There's no reason to hold the lock longer than necessary by
allocating memory in the lock section.
[..]
again
This is called in the context of usb_submit_urb()
[..]
This can fail for any urb due to urb->reject
The branch would be taken
[..]
This calls urb->complete. If the completion handler takes a spinlock
which is held when usb_submit_urb() was called, you deadlock.
[..]
This must be called with interrupts disabled.
Regards
Oliver
--