Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit df615907 authored by Patryk Duda's avatar Patryk Duda Committed by Tzung-Bi Shih
Browse files

platform/chrome: cros_ec_proto: Lock device when updating MKBP version

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: f74c7557

 ("platform/chrome: cros_ec_proto: Update version on GET_NEXT_EVENT failure")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPatryk Duda <patrykd@google.com>
Link: https://lore.kernel.org/r/20240730104425.607083-1-patrykd@google.com


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 4baf1cc5
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment