linux/drivers/usb/typec
Andrei Kuchynski fb0bf289f5 usb: typec: ucsi: Correct teardown ordering in ucsi_init() error path
The commit 7aa7d4bf9d ("usb: typec: ucsi: Fix race condition and
ordering in port unregistration") consolidated port teardown into the
ucsi_unregister_port() helper. However, it introduced an ordering problem
in the ucsi_init() error path.

Fix this by ensuring ucsi_unregister_port() is called before we unregister
their corresponding lockdep keys.

Cc: stable@vger.kernel.org
Fixes: 7aa7d4bf9d ("usb: typec: ucsi: Fix race condition and ordering in port unregistration")
Reported-by: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>
Closes: https://lore.kernel.org/all/22064276-6c56-411a-9f20-6917ceeb865f@intel.com/
Signed-off-by: Andrei Kuchynski <akuchynski@chromium.org>
Tested-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260717104614.325250-1-akuchynski@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-07-23 10:38:19 +02:00
..
altmodes usb: typec: altmodes/displayport: validate count before reading Status Update VDO 2026-05-19 12:25:35 +02:00
mux USB fixes for 7.2-rc3 2026-07-12 12:12:41 -07:00
tcpm USB fixes for 7.2-rc3 2026-07-12 12:12:41 -07:00
tipd Linux 7.1-rc6 2026-06-01 17:39:51 +02:00
ucsi usb: typec: ucsi: Correct teardown ordering in ucsi_init() error path 2026-07-23 10:38:19 +02:00
anx7411.c usb: typec: anx7411: use devm_pm_runtime_enable() 2026-07-08 13:34:06 +02:00
bus.c usb: typec: Export typec bus and typec altmode device type 2025-12-17 14:42:34 +01:00
bus.h usb: typec: Export typec bus and typec altmode device type 2025-12-17 14:42:34 +01:00
class.c usb: typec: class: drop PD lookup reference 2026-07-08 13:55:10 +02:00
class.h usb: typec: Implement mode selection 2026-01-23 17:18:01 +01:00
hd3ss3220.c usb: typec: hd3ss3220: Check if regulator needs to be switched 2026-02-06 11:23:50 +01:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: Implement mode selection 2026-01-23 17:18:01 +01:00
mode_selection.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mux.c Revert "usb: typec: mux: avoid duplicated mux switches" 2026-07-08 17:17:14 +02:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c usb: typec: Connect Type-C port with associated USB4 port 2025-04-17 12:21:45 +03:00
retimer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
retimer.h usb: typec: Make bus switch code retimer-aware 2023-01-17 17:29:00 +01:00
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 usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00