WSL2-Linux-Kernel/drivers/platform/chrome
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
..
wilco_ec
Kconfig
Makefile
chromeos_laptop.c
chromeos_pstore.c
chromeos_tbmc.c
cros_ec.c
cros_ec.h
cros_ec_chardev.c
cros_ec_debugfs.c
cros_ec_i2c.c
cros_ec_ishtp.c
cros_ec_lightbar.c
cros_ec_lpc.c
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_proto.c
cros_ec_rpmsg.c
cros_ec_sensorhub.c
cros_ec_sensorhub_ring.c
cros_ec_sensorhub_trace.h
cros_ec_spi.c
cros_ec_sysfs.c
cros_ec_trace.c
cros_ec_trace.h
cros_ec_typec.c
cros_ec_vbc.c
cros_kbd_led_backlight.c
cros_usbpd_logger.c
cros_usbpd_notify.c