[PATCH] USB: add might_sleep() to usb_unlink_urb() to warn developers
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
682d4c803f
commit
e9aa795aae
1 changed files with 1 additions and 0 deletions
|
@ -468,6 +468,7 @@ int usb_unlink_urb(struct urb *urb)
|
||||||
*/
|
*/
|
||||||
void usb_kill_urb(struct urb *urb)
|
void usb_kill_urb(struct urb *urb)
|
||||||
{
|
{
|
||||||
|
might_sleep();
|
||||||
if (!(urb && urb->dev && urb->dev->bus && urb->dev->bus->op))
|
if (!(urb && urb->dev && urb->dev->bus && urb->dev->bus->op))
|
||||||
return;
|
return;
|
||||||
spin_lock_irq(&urb->lock);
|
spin_lock_irq(&urb->lock);
|
||||||
|
|
Reference in a new issue