linux_dsm_epyc7002/drivers/usb/host
Mayank Rana b3207c65df usb: xhci: Handle error condition in xhci_stop_device()
xhci_stop_device() calls xhci_queue_stop_endpoint() multiple times
without checking the return value. xhci_queue_stop_endpoint() can
return error if the HC is already halted or unable to queue commands.
This can cause a deadlock condition as xhci_stop_device() would
end up waiting indefinitely for a completion for the command that
didn't get queued. Fix this by checking the return value and bailing
out of xhci_stop_device() in case of error. This patch happens to fix
potential memory leaks of the allocated command structures as well.

Fixes: c311e391a7 ("xhci: rework command timeout and cancellation,")
Cc: <stable@vger.kernel.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-17 10:38:13 +02:00
..
whci USB: whci-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
bcma-hcd.c
ehci-atmel.c
ehci-dbg.c usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
ehci-exynos.c usb: host: ehci-exynos: Handle return value of clk_prepare_enable 2017-06-13 10:48:24 +02:00
ehci-fsl.c usb: host: make ehci_fsl_overrides const and __initconst 2017-08-31 18:08:46 +02:00
ehci-fsl.h
ehci-grlib.c
ehci-hcd.c usb: host: Remove remaining pci_pool in comments 2017-03-16 18:03:31 +09:00
ehci-hub.c
ehci-mem.c usb: ehci: use bus->sysdev for DMA configuration 2017-03-23 08:20:21 +01:00
ehci-msm.c
ehci-mv.c
ehci-mxc.c
ehci-omap.c usb: ehci-omap: fix error return code in ehci_hcd_omap_probe() 2017-08-10 11:36:50 -07:00
ehci-orion.c usb: orion-ehci: Add support for the Armada 3700 2017-03-17 13:32:59 +09:00
ehci-pci.c
ehci-platform.c USB: ehci-platform: fix companion-device leak 2017-05-17 11:52:44 +02:00
ehci-pmcmsp.c
ehci-ppc-of.c
ehci-ps3.c
ehci-q.c
ehci-sched.c usb: host: remove unnecessary null check 2017-05-17 12:20:53 +02:00
ehci-sh.c
ehci-spear.c
ehci-st.c
ehci-sysfs.c
ehci-tegra.c
ehci-tilegx.c
ehci-timer.c usb: Make use of ktime_* comparison functions 2017-06-03 18:08:04 +09:00
ehci-w90x900.c
ehci-xilinx-of.c
ehci.h
fhci-dbg.c
fhci-hcd.c
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c usb: Make use of ktime_* comparison functions 2017-06-03 18:08:04 +09:00
fotg210.h
fsl-mph-dr-of.c usb: Convert to using %pOF instead of full_name 2017-07-22 15:56:53 +02:00
hwa-hc.c usb: hwa-hc: constify usb_device_id 2017-08-10 11:31:26 -07:00
imx21-dbg.c
imx21-hcd.c usb: imx21-hcd: make imx21_hc_driver const 2017-08-31 18:08:46 +02:00
imx21-hcd.h
isp116x-hcd.c isp116x-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
isp116x.h
isp1362-hcd.c isp1362-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
isp1362.h
Kconfig usb: host: ohci-omap3: Remove driver in favor of ohci-platform 2017-06-03 18:08:05 +09:00
Makefile usb: host: ohci-omap3: Remove driver in favor of ohci-platform 2017-06-03 18:08:05 +09:00
max3421-hcd.c usb: host: max3421-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
ohci-at91.c
ohci-da8xx.c
ohci-dbg.c
ohci-exynos.c
ohci-hcd.c ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
ohci-hub.c
ohci-mem.c
ohci-nxp.c
ohci-omap.c mfd: tps65010: Move header file out of I2C realm 2017-08-15 08:27:22 +01:00
ohci-pci.c ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
ohci-platform.c usb: host: ohci-platform: Add support for omap3 and later 2017-06-03 18:08:04 +09:00
ohci-ppc-of.c
ohci-ps3.c
ohci-pxa27x.c usb: host: ohci-pxa27x: Handle return value of clk_prepare_enable 2017-06-29 14:49:06 +02:00
ohci-q.c
ohci-s3c2410.c
ohci-sa1111.c
ohci-sm501.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
ohci-spear.c
ohci-st.c
ohci-tilegx.c
ohci-tmio.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
ohci.h ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
oxu210hp-hcd.c usb: host: Remove remaining pci_pool in comments 2017-03-16 18:03:31 +09:00
oxu210hp.h
pci-quirks.c xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround 2017-09-18 17:10:41 +02:00
pci-quirks.h xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue 2017-08-02 12:05:07 -05:00
r8a66597-hcd.c usb: r8a66597-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
r8a66597.h
sl811_cs.c
sl811-hcd.c usb: host/sl811-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
sl811.h
ssb-hcd.c
u132-hcd.c usb: host: u132-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
uhci-debug.c
uhci-grlib.c
uhci-hcd.c usb/uhci: Add support for Aspeed BMC SoCs 2017-05-25 14:30:13 +02:00
uhci-hcd.h usb/uhci: Add support for Aspeed BMC SoCs 2017-05-25 14:30:13 +02:00
uhci-hub.c
uhci-pci.c PM / core: Drop run_wake flag from struct dev_pm_info 2017-06-28 01:52:52 +02:00
uhci-platform.c usb/uhci: Add support for Aspeed BMC SoCs 2017-05-25 14:30:13 +02:00
uhci-q.c
xhci-dbg.c usb: xhci: remove xhci_dbg_ctx() 2017-04-08 12:17:42 +02:00
xhci-ext-caps.h
xhci-hub.c usb: xhci: Handle error condition in xhci_stop_device() 2017-10-17 10:38:13 +02:00
xhci-mem.c Merge 4.12-rc6 into usb-next 2017-06-20 10:16:07 +08:00
xhci-mtk-sch.c
xhci-mtk.c usb: xhci-mtk: add generic compatible string 2017-08-31 18:08:46 +02:00
xhci-mtk.h
xhci-mvebu.c
xhci-mvebu.h
xhci-pci.c Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts" 2017-09-18 17:10:41 +02:00
xhci-plat.c usb: host: xhci-plat: allow sysdev to inherit from ACPI 2017-09-18 17:10:41 +02:00
xhci-plat.h usb: host: xhci-plat: add resume_quirk() 2017-04-19 19:59:17 +02:00
xhci-rcar.c usb: host: xhci: rcar: Add support for R-Car H3 ES2.0 2017-08-16 15:26:26 -07:00
xhci-rcar.h usb: host: xhci-plat: set resume_quirk() for R-Car controllers 2017-04-19 19:59:17 +02:00
xhci-ring.c usb: xhci: Reset halted endpoint if trb is noop 2017-10-17 10:38:13 +02:00
xhci-tegra.c usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct 2017-03-09 18:00:39 +01:00
xhci-trace.c
xhci-trace.h xhci: add port status tracing 2017-08-16 15:26:26 -07:00
xhci.c xhci: Identify USB 3.1 capable hosts by their port protocol capability 2017-10-17 10:38:12 +02:00
xhci.h Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts" 2017-09-18 17:10:41 +02:00