1
0
Fork 0
alistair23-linux/drivers/platform
Pi-Hsun Shih 8078d3af4a platform/chrome: cros_ec_rpmsg: Fix race with host event
commit f775ac78fc upstream.

Host event can be sent by remoteproc by any time, and
cros_ec_rpmsg_callback would be called after cros_ec_rpmsg_create_ept.
But the cros_ec_device is initialized after that, which cause host event
handler to use cros_ec_device that are not initialized properly yet.

Fix this by don't schedule host event handler before cros_ec_register
returns. Instead, remember that we have a pending host event, and
schedule host event handler after cros_ec_register.

Fixes: 71cddb7097 ("platform/chrome: cros_ec_rpmsg: Fix race with host command when probe failed.")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-21 09:04:51 +02:00
..
chrome platform/chrome: cros_ec_rpmsg: Fix race with host event 2020-04-21 09:04:51 +02:00
goldfish treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mellanox platform/mellanox: fix potential deadlock in the tmfifo driver 2020-01-17 19:48:42 +01:00
mips MIPS: Loongson: Fix return value of loongson_hwmon_init 2020-01-17 19:48:55 +01:00
olpc Platform: OLPC: add SPI MODULE_DEVICE_TABLE 2019-07-25 20:21:00 +03:00
x86 platform/x86: asus-wmi: Support laptops where the first battery is named BATT 2020-04-17 10:50:13 +02:00
Kconfig platform-drivers-x86 for v5.3-1 2019-07-14 16:51:47 -07:00
Makefile Platform: OLPC: Add XO-1.75 EC driver 2019-05-20 17:27:08 +03:00