linux-stable/drivers/usb/host
Mathias Nyman 4a593a62a9 xhci: Fix null pointer dereference in remove if xHC has only one roothub
The remove path in xhci platform driver tries to remove and put both main
and shared hcds even if only a main hcd exists (one roothub)

This causes a null pointer dereference in reboot for those controllers.

Check that the shared_hcd exists before trying to remove it.

Fixes: e0fe986972 ("usb: host: xhci-plat: prepare operation w/o shared hcd")
Reported-by: Alexey Sheplyakov <asheplyakov@basealt.ru>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220825150840.132216-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 17:48:30 +02:00
..
Kconfig staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
Makefile staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
bcma-hcd.c Revert "USB: bcma: Add a check for devm_gpiod_get" 2021-09-14 10:34:15 +02:00
ehci-atmel.c USB: host: ehci-atmel: Add support for HSIC phy 2021-09-14 10:26:29 +02:00
ehci-brcm.c USB: ehci_brcm_hub_control: Improve port index sanitizing 2021-11-17 14:34:18 +01:00
ehci-dbg.c usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializers 2022-02-15 15:11:20 +01:00
ehci-exynos.c
ehci-fsl.c drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode. 2022-07-08 14:58:51 +02:00
ehci-fsl.h
ehci-grlib.c
ehci-hcd.c USB: Fix ehci infinite suspend-resume loop issue in zhaoxin 2022-04-21 18:53:53 +02:00
ehci-hub.c USB: EHCI: Improve port index sanitizing 2021-10-05 12:52:03 +02:00
ehci-mem.c usb: host: ehci: Make use of dma_pool_zalloc() instead of dma_pool_alloc/memset() 2021-10-21 12:47:56 +02:00
ehci-mv.c usb: host: ehci-mv: drop duplicated MODULE_ALIAS 2021-09-21 16:33:00 +02:00
ehci-npcm7xx.c
ehci-omap.c usb: ehci-omap: drop unused ehci_read() function 2022-05-05 21:53:18 +02:00
ehci-orion.c usb: ehci-orion: Handle errors of clk_prepare_enable() in probe 2021-08-26 13:09:34 +02:00
ehci-pci.c USB: Fix ehci infinite suspend-resume loop issue in zhaoxin 2022-04-21 18:53:53 +02:00
ehci-platform.c usb: host: ehci-platform: add TPL support 2022-06-21 18:31:34 +02:00
ehci-ppc-of.c usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe 2022-06-10 11:21:55 +02:00
ehci-ps3.c
ehci-q.c usb: host: ehci-q: Fix ehci_submit_single_step_set_feature annotation typo 2022-06-21 16:40:31 +02:00
ehci-sched.c usb: host: ehci-sched: Use struct_size() in kzalloc() 2022-01-26 13:50:07 +01:00
ehci-sh.c Revert "usb: host: ehci-sh: propagate errors from platform_get_irq()" 2021-12-21 07:14:05 +01:00
ehci-spear.c
ehci-st.c
ehci-sysfs.c
ehci-timer.c
ehci-xilinx-of.c usb: host: ehci-xilinx: adding description for return value 2022-05-12 13:58:48 +02:00
ehci.h USB: Fix ehci infinite suspend-resume loop issue in zhaoxin 2022-04-21 18:53:53 +02:00
fhci-dbg.c
fhci-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
fotg210.h usb: host: fotg210: fix the actual_length of an iso packet 2021-07-21 10:03:42 +02:00
fsl-mph-dr-of.c drivers/usb/host/ehci-fsl: Fix interrupt setup in host mode. 2022-07-08 14:58:51 +02:00
isp116x-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
isp116x.h
isp1362-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
isp1362.h
max3421-hcd.c usb: max-3421: drop unexpected word "the" in the comments 2022-06-24 13:39:53 +02:00
octeon-hcd.c staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
octeon-hcd.h staging: octeon-usb: move driver out of staging 2022-06-21 16:43:37 +02:00
ohci-at91.c usb: host: ohci-at91: add support to enter suspend using SMC 2022-06-10 11:22:18 +02:00
ohci-da8xx.c
ohci-dbg.c usb: host: {e|o}hci-dbg: kill useless 'ret' variable initializers 2022-02-15 15:11:20 +01:00
ohci-exynos.c
ohci-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
ohci-hub.c usb: ohci: disable start-of-frame interrupt in ohci_rh_suspend 2021-10-21 12:48:18 +02:00
ohci-mem.c
ohci-nxp.c usb: ohci-nxp: Fix refcount leak in ohci_hcd_nxp_probe 2022-06-10 11:22:07 +02:00
ohci-omap.c USB / Thunderbolt changes for 5.19-rc1 2022-06-03 11:17:49 -07:00
ohci-pci.c
ohci-platform.c usb: host: ohci-platform: add TPL support 2022-06-21 18:31:34 +02:00
ohci-ppc-of.c usb: host: ohci-ppc-of: Fix refcount leak bug 2022-06-21 16:38:53 +02:00
ohci-ps3.c
ohci-pxa27x.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
ohci-q.c
ohci-s3c2410.c usb: ohci-s3c2410: Use platform_get_irq() to get the interrupt 2021-12-17 16:51:59 +01:00
ohci-sa1111.c ARM: sa1100/assabet: move dmabounce hack to ohci driver 2022-07-07 18:18:47 +02:00
ohci-sm501.c USB: ohci-sm501: Fix typo in comment 2022-06-21 16:39:39 +02:00
ohci-spear.c usb: ohci-spear: Remove direct access to platform_device resource list 2021-12-17 16:51:31 +01:00
ohci-st.c
ohci-tmio.c headers/prep: Fix non-standard header section: drivers/usb/host/ohci-tmio.c 2022-01-05 16:18:11 +01:00
ohci.h
oxu210hp-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
pci-quirks.c
pci-quirks.h
r8a66597-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
r8a66597.h
sl811-hcd.c usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
sl811.h
sl811_cs.c
ssb-hcd.c
u132-hcd.c usb: Remove redundant 'flush_workqueue()' calls 2021-11-17 14:36:57 +01:00
uhci-debug.c
uhci-grlib.c usb/host: fix repeated words in comments 2022-07-27 14:33:33 +02:00
uhci-hcd.c
uhci-hcd.h usb/host: fix repeated words in comments 2022-07-27 14:33:33 +02:00
uhci-hub.c
uhci-pci.c
uhci-platform.c usb: uhci: Use platform_get_irq() to get the interrupt 2021-12-17 16:52:21 +01:00
uhci-q.c
xen-hcd.c xen/usbfront: use xenbus_setup_ring() and xenbus_teardown_ring() 2022-05-19 14:22:05 +02:00
xhci-dbg.c
xhci-dbgcap.c xhci: dbc: Don't call dbc_tty_init() on every dbc tty probe 2022-02-17 16:20:45 +01:00
xhci-dbgcap.h xhci: dbgtty: use IDR to support several dbc instances. 2022-02-17 16:20:45 +01:00
xhci-dbgtty.c xhci: dbgtty: use IDR to support several dbc instances. 2022-02-17 16:20:45 +01:00
xhci-debugfs.c xhci: fix even more unsafe memory usage in xhci tracing 2021-08-26 13:06:02 +02:00
xhci-debugfs.h
xhci-ext-caps.c
xhci-ext-caps.h usb: xhci: Increase timeout for HC halt 2021-05-13 14:47:36 +02:00
xhci-histb.c
xhci-hub.c xhci: turn off port power in shutdown 2022-06-23 16:27:28 +02:00
xhci-mem.c xhci: use generic command timer for stop endpoint commands. 2022-05-12 18:32:25 +02:00
xhci-mtk-sch.c usb: xhci-mtk: fix bandwidth release issue 2022-08-19 10:39:08 +02:00
xhci-mtk.c usb: xhci-mtk: add support optional controller reset 2022-06-10 11:50:05 +02:00
xhci-mtk.h usb: xhci-mtk: remove bandwidth budget table 2022-05-12 18:35:38 +02:00
xhci-mvebu.c Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-mvebu.h Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-pci-renesas.c usb: renesas-xhci: Do not print any log while fw verif success 2022-07-27 14:37:48 +02:00
xhci-pci.c xhci-pci: Allow host runtime PM as default for Intel Meteor Lake xHCI 2022-06-23 16:27:28 +02:00
xhci-pci.h usb: renesas-xhci: Remove renesas_xhci_pci_exit() 2021-07-21 10:05:59 +02:00
xhci-plat.c xhci: Fix null pointer dereference in remove if xHC has only one roothub 2022-08-25 17:48:30 +02:00
xhci-plat.h Revert "usb: host: xhci: mvebu: make USB 3.0 PHY optional for Armada 3720" 2022-02-25 19:12:21 +05:30
xhci-rcar.c usb: Drop commas after SoC match table sentinels 2022-03-03 15:45:15 +01:00
xhci-rcar.h
xhci-ring.c USB: xhci: Fix comment typo 2022-07-27 14:36:39 +02:00
xhci-tegra.c usb: xhci: tegra: Fix error check 2022-06-10 11:48:52 +02:00
xhci-trace.c
xhci-trace.h xhci: tracing: Use the new __vstring() helper 2022-07-15 17:44:41 -04:00
xhci.c xhci: turn off port power in shutdown 2022-06-23 16:27:28 +02:00
xhci.h usb: host: xhci: use snprintf() in xhci_decode_trb() 2022-06-30 15:42:31 +02:00