linux/drivers/usb/typec
Andrei Kuchynski 099cf1fbb8 usb: typec: displayport: Fix potential deadlock
The deadlock can occur due to a recursive lock acquisition of
`cros_typec_altmode_data::mutex`.
The call chain is as follows:
1. cros_typec_altmode_work() acquires the mutex
2. typec_altmode_vdm() -> dp_altmode_vdm() ->
3. typec_altmode_exit() -> cros_typec_altmode_exit()
4. cros_typec_altmode_exit() attempts to acquire the mutex again

To prevent this, defer the `typec_altmode_exit()` call by scheduling
it rather than calling it directly from within the mutex-protected
context.

Cc: stable <stable@kernel.org>
Fixes: b4b38ffb38 ("usb: typec: displayport: Receive DP Status Update NAK request exit dp altmode")
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250624133246.3936737-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-24 15:43:15 +01:00
..
altmodes usb: typec: displayport: Fix potential deadlock 2025-06-24 15:43:15 +01:00
mux usb: typec: mux: fsa4480: add regulator support 2025-04-25 13:20:09 +02:00
tcpm usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach 2025-06-24 15:42:24 +01:00
tipd usb: typec: tipd: fix typo in TPS_STATUS_HIGH_VOLAGE_WARNING macro 2025-05-23 12:37:31 +02:00
ucsi USB/Thunderbolt changes for 6.16-rc1 2025-06-06 12:45:35 -07:00
Kconfig
Makefile
anx7411.c usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_switch_probe() 2024-12-04 16:25:54 +01:00
bus.c USB: typec: fix const issue in typec_match() 2025-05-23 12:36:40 +02:00
bus.h
class.c usb: typec: class: Unlocked on error in typec_register_partner() 2025-04-15 14:31:58 +02:00
class.h usb: typec: class: Fix NULL pointer access 2025-04-11 14:57:36 +02:00
hd3ss3220.c usb: typec: hd3ss3220: support configuring role preference based on fwnode property and typec_operation 2024-12-24 08:56:04 +01:00
mux.c usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set 2025-04-11 16:08:32 +02:00
mux.h
pd.c usb: typec: constify the struct device_type usage 2024-02-19 09:35:46 +01:00
pd.h
port-mapper.c usb: typec: Connect Type-C port with associated USB4 port 2025-04-17 12:21:45 +03:00
retimer.c usb: typec: constify struct class usage 2024-03-02 20:21:06 +01:00
retimer.h
rt1719.c power: supply: Change usb_types from an array into a bitmask 2024-09-03 23:20:28 +02:00
stusb160x.c usb: typec: stusb160x: Make use of i2c_get_match_data() 2024-10-04 15:12:15 +02:00
wusb3801.c