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
mellanox
mips platform: mips: cpu_hwmon: Disable driver on unsupported hardware 2024-08-19 05:45:20 +02:00
olpc
surface
x86 platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB 2024-07-27 10:46:12 +02:00
Kconfig
Makefile