diff options
author | Andrei Kuchynski <akuchynski@chromium.org> | 2025-06-24 16:32:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-10 17:08:54 +0300 |
commit | 80c25d7916a44715338d4f8924c8e52af50d0b9f (patch) | |
tree | dcaffa7dcc9a200e506df5899fb593d79e0901a3 /scripts/gdb/linux/utils.py | |
parent | 8ca9c0f5881de0c51f2f6f645f7eb8e84d8ce3e1 (diff) | |
download | linux-80c25d7916a44715338d4f8924c8e52af50d0b9f.tar.xz |
usb: typec: displayport: Fix potential deadlock
commit 099cf1fbb8afc3771f408109f62bdec66f85160e upstream.
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: b4b38ffb38c9 ("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>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions