Skip to content

Commit 9ab62f0

Browse files
P33Mpopcornmix
P33M
authored andcommitted
dwc_otg: fix potential sleep while atomic during urb enqueue
Fixes a regression introduced with eb1b482. 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.
1 parent c3bc1d4 commit 9ab62f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,7 @@ static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
781781
{
782782
retval = dwc_otg_hcd_urb_enqueue(dwc_otg_hcd, dwc_otg_urb,
783783
/*(dwc_otg_qh_t **)*/
784-
ref_ep_hcpriv,
785-
mem_flags == GFP_ATOMIC ? 1 : 0);
784+
ref_ep_hcpriv, 1);
786785
if (0 == retval) {
787786
if (alloc_bandwidth) {
788787
allocate_bus_bandwidth(hcd,

0 commit comments

Comments
 (0)