Parcourir la source

xHCI: release spinlock when setup interrupt

Jiri Slaby reports spinlock is held while calling kmalloc(GFP_KERNEL)
and request_irq() in xhci_resume().

Release the spinlock when setup interrupt.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Andiry Xu il y a 14 ans
Parent
commit
74bb844af8
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      drivers/usb/host/xhci.c

+ 2 - 0
drivers/usb/host/xhci.c

@@ -714,6 +714,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 		return retval;
 		return retval;
 	}
 	}
 
 
+	spin_unlock_irq(&xhci->lock);
 	/* Re-setup MSI-X */
 	/* Re-setup MSI-X */
 	if (hcd->irq)
 	if (hcd->irq)
 		free_irq(hcd->irq, hcd);
 		free_irq(hcd->irq, hcd);
@@ -736,6 +737,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 		hcd->irq = pdev->irq;
 		hcd->irq = pdev->irq;
 	}
 	}
 
 
+	spin_lock_irq(&xhci->lock);
 	/* step 4: set Run/Stop bit */
 	/* step 4: set Run/Stop bit */
 	command = xhci_readl(xhci, &xhci->op_regs->command);
 	command = xhci_readl(xhci, &xhci->op_regs->command);
 	command |= CMD_RUN;
 	command |= CMD_RUN;