提交 9005355a 编写于 作者: J Jack Pham 提交者: Sarah Sharp

usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()

If CONFIG_PCI is enabled, make sure xhci_cleanup_msix()
doesn't try to free a bogus PCI IRQ or dereference an invalid
pci_dev when the xHCI device is actually a platform_device.

This patch should be backported to kernels as old as 3.9, that
contain the commit 52fb6125
"xhci-plat: Don't enable legacy PCI interrupts."
Signed-off-by: NJack Pham <jackp@codeaurora.org>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
上级 599459d8
...@@ -325,6 +325,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci) ...@@ -325,6 +325,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
struct usb_hcd *hcd = xhci_to_hcd(xhci); struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller); struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
if (xhci->quirks & XHCI_PLAT)
return;
xhci_free_irq(xhci); xhci_free_irq(xhci);
if (xhci->msix_entries) { if (xhci->msix_entries) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册