mirror-linux/drivers/usb
Sergey Shtylyov 209f4a67d8 usb: host: xhci-plat: fix possible kernel oops while resuming
[ Upstream commit a5f928db59 ]

If this driver enables the xHC clocks while resuming from sleep, it calls
clk_prepare_enable() without checking for errors and blithely goes on to
read/write the xHC's registers -- which, with the xHC not being clocked,
at least on ARM32 usually causes an imprecise external abort exceptions
which cause kernel oops.  Currently, the chips for which the driver does
the clock dance on suspend/resume seem to be the Broadcom STB SoCs, based
on ARM32 CPUs, as it seems...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Fixes: 8bd954c561 ("usb: host: xhci-plat: suspend and resume clocks")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231019102924.2797346-19-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:12 +01:00
..
atm
c67x00
cdns3 usb: cdnsp: Fixes issue with dequeuing not queued requests 2023-10-19 23:08:58 +02:00
chipidea usb: chipidea: Simplify Tegra DMA alignment code 2023-11-20 11:52:10 +01:00
class USB: usbtmc: Fix direction for 0-length ioctl control messages 2023-05-24 17:32:48 +01:00
common usb: common: usb-conn-gpio: Prevent bailing out if initial role is none 2023-08-16 18:27:24 +02:00
core usb: hub: Guard against accesses to uninitialized BOS descriptors 2023-10-19 23:08:55 +02:00
dwc2 usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency 2023-11-20 11:52:10 +01:00
dwc3 usb: dwc3: Soft reset phy on probe for host 2023-10-19 23:08:54 +02:00
early
gadget usb: raw-gadget: properly handle interrupted requests 2023-11-08 14:11:03 +01:00
host usb: host: xhci-plat: fix possible kernel oops while resuming 2023-11-20 11:52:12 +01:00
image
isp1760
misc usb: misc: onboard_hub: add support for Microchip USB2412 USB 2.0 hub 2023-10-25 12:03:08 +02:00
mon
mtu3
musb usb: musb: Modify the "HWVers" register address 2023-10-19 23:08:55 +02:00
phy usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host() 2023-09-13 09:42:51 +02:00
renesas_usbhs
roles Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-07-19 16:21:56 +02:00
serial USB: serial: option: add Fibocom to DELL custom modem FM101R-GL 2023-10-25 12:03:14 +02:00
storage usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility 2023-11-08 14:11:03 +01:00
typec usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm() 2023-11-08 14:11:03 +01:00
usbip USB: usbip: fix stub_dev hub disconnect 2023-11-20 11:52:10 +01:00
Kconfig
Makefile
usb-skeleton.c