]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: Fix locking pattern in wilco_ec_mailbox()
authorNick Crews <ncrews@chromium.org>
Mon, 11 Mar 2019 15:58:38 +0000 (09:58 -0600)
committerBenson Leung <bleung@chromium.org>
Mon, 18 Mar 2019 17:29:40 +0000 (10:29 -0700)
commit265e3f3c7e3e7b50988882605aeb6b7739c5fdd8
treee17e26e215c3fb454afa41633ab4408f04f36b2c
parente4e51e33dd8077fd84bc0ff18f93058415c15032
platform/chrome: Fix locking pattern in wilco_ec_mailbox()

Before, ec->data_buffer could be written to from multiple
contexts at the same time. Since the ec is shared data,
it needs to be inside the mutex as well.

Fixes: d25febffb03c ("platform/chrome: Add new driver for Wilco EC")
Signed-off-by: Nick Crews <ncrews@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/wilco_ec/mailbox.c