kernel_samsung_a53x/drivers/platform/chrome
Patryk Duda fe83d2940b 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: f74c7557ed0d ("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-11-23 23:20:20 +01:00
..
wilco_ec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chromeos_laptop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chromeos_pstore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chromeos_tbmc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_chardev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: fix wrong EC message version 2024-11-23 23:19:56 +01:00
cros_ec_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_ishtp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_lightbar.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_lpc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_lpc_mec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_lpc_mec.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_proto.c platform/chrome: cros_ec_proto: Lock device when updating MKBP version 2024-11-23 23:20:20 +01:00
cros_ec_rpmsg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_sensorhub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_sensorhub_ring.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_sensorhub_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_typec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_vbc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_kbd_led_backlight.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_usbpd_logger.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_usbpd_notify.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00