linux-stable/drivers/usb
Xu Yang 40a192ae30 usb: chipidea: core: fix possible concurrent when switch role
commit 451b15ed13 upstream.

The user may call role_store() when driver is handling
ci_handle_id_switch() which is triggerred by otg event or power lost
event. Unfortunately, the controller may go into chaos in this case.
Fix this by protecting it with mutex lock.

Fixes: a932a8041f ("usb: chipidea: core: add sysfs group")
cc: <stable@vger.kernel.org>
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20230317061516.2451728-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-30 12:51:36 +02:00
..
atm
c67x00
cdns3 usb: cdnsp: changes PCI Device ID to fix conflict with CNDS3 driver 2023-03-30 12:51:36 +02:00
chipidea usb: chipidea: core: fix possible concurrent when switch role 2023-03-30 12:51:36 +02:00
class USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
common USB: ULPI: fix memory leak with using debugfs_lookup() 2023-03-11 13:50:42 +01:00
core USB: fix memory leak with using debugfs_lookup() 2023-03-11 13:50:39 +01:00
dwc2 usb: dwc2: fix a devres leak in hw_enable upon suspend resume 2023-03-30 12:51:33 +02:00
dwc3 USB: dwc3: fix memory leak with using debugfs_lookup() 2023-03-11 13:50:42 +01:00
early usb: early: xhci-dbc: Fix a potential out-of-bound memory access 2023-03-10 09:28:53 +01:00
fotg210 USB: fotg210: fix memory leak with using debugfs_lookup() 2023-03-11 13:50:42 +01:00
gadget usb: gadget: u_audio: don't let userspace block driver unbind 2023-03-30 12:51:34 +02:00
host usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math 2023-03-11 13:50:44 +01:00
image
isp1760
misc usb: misc: onboard-hub: add support for Microchip USB2517 USB 2.0 hub 2023-03-30 12:51:33 +02:00
mon usb: mon: make mmapped memory read only 2022-09-22 15:52:29 +02:00
mtu3 usb: mtu3: fix failed runtime suspend in host only mode 2022-09-30 13:55:48 +02:00
musb usb: musb: mediatek: don't unregister something that wasn't registered 2023-03-10 09:28:53 +01:00
phy usb: isp1301-omap: Convert to i2c's .probe_new() 2022-11-22 17:33:27 +01:00
renesas_usbhs
roles Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
serial USB: serial: option: add support for VW/Skoda "Carstick LTE" 2023-03-03 11:56:17 +01:00
storage uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 2023-03-30 12:51:25 +02:00
typec usb: typec: tcpm: fix warning when handle discover_identity message 2023-03-30 12:51:36 +02:00
usbip Including fixes from bpf, netfilter and can. 2022-12-21 08:41:32 -08:00
Kconfig usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
Makefile usb: fotg210: Collect pieces of dual mode controller 2022-11-09 12:38:09 +01:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00