]> git.hungrycats.org Git - linux/commitdiff
dwc_otg: fix potential sleep while atomic during urb enqueue
authorP33M <P33M@github.com>
Fri, 2 Aug 2013 09:04:18 +0000 (10:04 +0100)
committerP33M <P33M@github.com>
Fri, 2 Aug 2013 09:04:18 +0000 (10:04 +0100)
Fixes a regression introduced with eb1b482a. Kmalloc called from
dwc_otg_hcd_qtd_add / dwc_otg_hcd_qtd_create did not always have
the GPF_ATOMIC flag set. Force this flag when inside the larger
critical section.

drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c

index 4c51c984bc1d41e56dfc1521ddb2200e19554255..64b2c8539a9f627bf177cb4575d852deeefe9002 100644 (file)
@@ -781,8 +781,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
        {
                retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
                                                /*(dwc_otg_qh_t **)*/
-                                               ref_ep_hcpriv,
-                                               mem_flags == GFP_ATOMIC ? 1 : 0);
+                                               ref_ep_hcpriv, 1);
                if (0 == retval) {
                        if (alloc_bandwidth) {
                                allocate_bus_bandwidth(hcd,