WSL2-Linux-Kernel/drivers/platform
Patryk Duda b6fc20e9bd platform/chrome: cros_ec_proto: Lock device when updating MKBP version
commit df615907f1bf907260af01ccb904d0e9304b5278 upstream.

The cros_ec_get_host_command_version_mask() function requires that the
caller must have ec_dev->lock mutex before calling it. This requirement
was not met and as a result it was possible that two commands were sent
to the device at the same time.

The problem was observed while using UART backend which doesn't use any
additional locks, unlike SPI backend which locks the controller until
response is received.

Fixes: f74c7557ed ("platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure")
Cc: stable@vger.kernel.org
Signed-off-by: Patryk Duda <patrykd@google.com>
Link: https://lore.kernel.org/r/20240730104425.607083-1-patrykd@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:45:33 +02:00
..
chrome platform/chrome: cros_ec_proto: Lock device when updating MKBP version 2024-08-19 05:45:33 +02:00
goldfish platform/goldfish: Convert pipe tasklet to threaded irq 2021-01-27 14:57:06 +01:00
mellanox platform/mellanox: Check devm_hwmon_device_register_with_groups() return value 2023-12-13 18:36:35 +01:00
mips platform: mips: cpu_hwmon: Disable driver on unsupported hardware 2024-08-19 05:45:20 +02:00
olpc platform/olpc: Fix uninitialized data in debugfs write 2022-08-17 14:23:58 +02:00
surface platform/surface: aggregator: fix recv_buf() return value 2023-12-13 18:36:44 +01:00
x86 platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB 2024-07-27 10:46:12 +02:00
Kconfig platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00
Makefile platform: Add Surface platform directory 2020-10-27 12:51:03 +01:00