linux/drivers/usb/chipidea
Xu Yang 451b15ed13 usb: chipidea: core: fix possible concurrent when switch role
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-23 18:17:32 +01:00
..
bits.h USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
ci_hdrc_imx.c usb: chipidea: ci_hdrc_imx: use dev_err_probe 2023-01-31 10:39:59 +01:00
ci_hdrc_imx.h usb: chipidea: usbmisc: group usbmisc operations for PM 2022-10-23 14:34:53 +02:00
ci_hdrc_msm.c usb: chipidea: msm: Ensure proper controller reset using role switch API 2020-05-07 08:46:35 +02:00
ci_hdrc_pci.c usb: chipidea: ci_hdrc_pci: Fix improper use of kerneldoc format 2020-07-09 17:19:56 +02:00
ci_hdrc_tegra.c usb: chipidea: tegra: Add runtime PM and OPP support 2021-12-16 14:05:23 +01:00
ci_hdrc_usb2.c usb: chipidea: Add support for VBUS control with PHY 2022-08-31 09:07:52 +02:00
ci.h usb: chipidea: core: fix possible concurrent when switch role 2023-03-23 18:17:32 +01:00
core.c usb: chipidea: core: fix possible concurrent when switch role 2023-03-23 18:17:32 +01:00
debug.c USB: chipidea: fix memory leak with using debugfs_lookup() 2023-02-06 13:46:41 +01:00
host.c usb: chipidea: host: add suspend/resume support for host controller 2022-10-23 14:34:53 +02:00
host.h usb: chipidea: add inline for ci_hdrc_host_driver_init if host is not defined 2020-01-22 07:54:27 +01:00
Kconfig usb: chipidea: make configs for glue drivers visible with EXPERT 2022-09-08 13:32:50 +02:00
Makefile usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
otg_fsm.c usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-09 12:34:18 +01:00
otg_fsm.h USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
otg.c usb: chipidea: core: fix possible concurrent when switch role 2023-03-23 18:17:32 +01:00
otg.h usb: chipidea: core: add controller resume support when controller is powered off 2022-10-23 14:34:53 +02:00
trace.c usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
trace.h usb: chipidea: tracing: Use the new __vstring() helper 2022-07-15 17:44:40 -04:00
udc.c usb: chipidea: udc: add suspend/resume support for device controller 2022-10-23 14:34:53 +02:00
udc.h usb: chipidea: udc: add software sg list support 2020-05-06 09:42:35 +08:00
ulpi.c usb: chipidea: Always build ULPI code 2018-07-05 14:22:47 +08:00
usbmisc_imx.c usb: chipidea: imx: Drop empty platform remove function 2023-01-06 16:37:14 +01:00