linux/drivers/platform/chrome
Tzung-Bi Shih 525cb7ba66 platform/chrome: cros_ec_typec: Init mutex in Thunderbolt registration
cros_typec_register_thunderbolt() missed initializing the `adata->lock`
mutex.  This leads to a NULL dereference when the mutex is later
acquired (e.g. in cros_typec_altmode_work()).

Initialize the mutex in cros_typec_register_thunderbolt() to fix the
issue.

Cc: stable@vger.kernel.org
Fixes: 3b00be26b1 ("platform/chrome: cros_ec_typec: Thunderbolt support")
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Link: https://lore.kernel.org/r/20260505053403.3335740-1-tzungbi@kernel.org
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2026-05-06 02:14:33 +00:00
..
wilco_ec platform/chrome: wilco_ec: event: Convert to a platform driver 2026-03-06 04:35:07 +00:00
Kconfig platform/chrome: Fix typo in CROS_USBPD_NOTIFY help text 2025-07-23 23:09:44 +00:00
Makefile platform/chrome: cros_ec_proto: Allow to build as module 2025-04-07 02:51:00 +00:00
chromeos_acpi.c
chromeos_laptop.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
chromeos_of_hw_prober.c platform/chrome: of_hw_prober: Support touchscreen probing on Squirtle 2025-04-25 02:16:24 +00:00
chromeos_privacy_screen.c platform/chrome: Convert ChromeOS privacy-screen driver to platform 2026-03-06 04:35:07 +00:00
chromeos_pstore.c platform/chrome: chromeos_pstore: Add ecc_size module parameter 2025-06-23 02:36:23 +00:00
chromeos_tbmc.c platform/chrome: chromeos_tbmc: Convert to a platform driver 2026-03-06 04:35:07 +00:00
cros_ec.c platform/chrome: cros_ec: Add a flag to track registration state 2025-09-14 11:34:41 +08:00
cros_ec.h platform/chrome: Centralize cros_ec_device allocation 2025-09-14 11:34:41 +08:00
cros_ec_chardev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: Avoid -Wflex-array-member-not-at-end warnings 2025-04-07 02:06:55 +00:00
cros_ec_i2c.c platform/chrome: Centralize common cros_ec_device initialization 2025-09-14 11:34:41 +08:00
cros_ec_ishtp.c platform/chrome: cros_ec_ishtp: Fix UAF after unbinding driver 2025-11-10 06:29:54 +00:00
cros_ec_lightbar.c platform/chrome: lightbar: Optimize command size 2026-02-23 15:34:17 +08:00
cros_ec_lpc.c platform/chrome: Centralize common cros_ec_device initialization 2025-09-14 11:34:41 +08:00
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_proto.c platform/chrome: cros_ec: Add a flag to track registration state 2025-09-14 11:34:41 +08:00
cros_ec_proto_test.c
cros_ec_proto_test_util.c
cros_ec_proto_test_util.h platform/chrome: kunit: Avoid -Wflex-array-member-not-at-end 2025-05-07 03:04:29 +00:00
cros_ec_rpmsg.c platform/chrome: Centralize common cros_ec_device initialization 2025-09-14 11:34:41 +08:00
cros_ec_sensorhub.c platform/chrome: cros_ec_sensorhub: Retries when a sensor is not ready 2025-06-24 02:49:28 +00:00
cros_ec_sensorhub_ring.c platform/chrome: sensorhub: Support devices without FIFO_INT_ENABLE 2025-11-14 02:57:32 +00:00
cros_ec_sensorhub_trace.h
cros_ec_spi.c platform/chrome: Centralize common cros_ec_device initialization 2025-09-14 11:34:41 +08:00
cros_ec_sysfs.c platform/chrome: cros_ec_sysfs: Expose AP_MODE_ENTRY feature state 2025-02-05 04:03:31 +00:00
cros_ec_trace.c
cros_ec_trace.h
cros_ec_typec.c platform/chrome: cros_ec_typec: Set no_mode_control flag 2026-01-23 17:18:01 +01:00
cros_ec_typec.h platform/chrome: cros_ec_typec: Add support for setting USB mode via sysfs 2025-02-21 01:42:22 +00:00
cros_ec_uart.c platform/chrome: Centralize common cros_ec_device initialization 2025-09-14 11:34:41 +08:00
cros_ec_vbc.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
cros_hps_i2c.c platform/chrome: cros_hps_i2c: Discard pm_runtime_put() return value 2026-01-08 21:36:51 +01:00
cros_kbd_led_backlight.c platform/chrome: cros_kbd_led_backlight: Avoid -Wflex-array-member-not-at-end warnings 2025-04-07 02:04:55 +00:00
cros_typec_altmode.c platform/chrome: cros_ec_typec: Init mutex in Thunderbolt registration 2026-05-06 02:14:33 +00:00
cros_typec_altmode.h
cros_typec_switch.c platform/chrome: cros_typec_switch: Use acpi_get_local_u64_address() 2026-01-21 04:38:44 +00:00
cros_typec_vdm.c
cros_typec_vdm.h
cros_usbpd_logger.c platform/chrome: cros_usbpd_logger: Simplify with devm 2026-03-20 02:57:04 +00:00
cros_usbpd_notify.c platform/chrome: cros_usbpd_notify: defer probe when parent EC driver isn't ready 2025-10-13 02:53:44 +00:00