From: Kevin Hilman Date: Wed, 20 Feb 2008 17:27:10 +0000 (-0800) Subject: ARM: OMAP: MUSB: prevent recursive spinlock in TX path X-Git-Tag: v2.6.25-omap1~153 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=4bbf5ebf1fdedd08d84c80a8ba011fd353d8fc5b ARM: OMAP: MUSB: prevent recursive spinlock in TX path If a hard IRQ occurs during the soft IRQ TX processing, a recursive spinlock BUG can occur. Prevent this by interrupt-off locking around usb_hcd_link_urb_to_ep() Found while testing bluetooth A2DP audio over USB. Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 2ad2ed95404..82e12655dc8 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1757,7 +1757,9 @@ static int musb_urb_enqueue( if (!is_host_active(musb) || !musb->is_active) return -ENODEV; + spin_lock_irqsave(&musb->lock, flags); ret = usb_hcd_link_urb_to_ep(hcd, urb); + spin_unlock_irqrestore(&musb->lock, flags); if (ret) return ret;