linux/drivers/usb/chipidea
Xu Yang 4c1a06454f 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:49:24 +02:00
..
bits.h
ci_hdrc_imx.c
ci_hdrc_imx.h
ci_hdrc_msm.c
ci_hdrc_pci.c
ci_hdrc_tegra.c
ci_hdrc_usb2.c
ci.h usb: chipidea: core: fix possible concurrent when switch role 2023-03-30 12:49:24 +02:00
core.c usb: chipidea: core: fix possible concurrent when switch role 2023-03-30 12:49:24 +02:00
debug.c USB: chipidea: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:36 +01:00
host.c
host.h
Kconfig usb: chipidea: make configs for glue drivers visible with EXPERT 2022-09-08 13:32:50 +02:00
Makefile
otg_fsm.c usb: chipidea: fix deadlock in ci_otg_del_timer 2022-11-09 12:34:18 +01:00
otg_fsm.h
otg.c usb: chipidea: core: fix possible concurrent when switch role 2023-03-30 12:49:24 +02:00
otg.h
trace.c
trace.h
udc.c
udc.h
ulpi.c
usbmisc_imx.c