linux-stable/drivers/platform
Armin Wolf 88d7042904 platform/x86: xiaomi-wmi: Fix race condition when reporting key events
[ Upstream commit 290680c2da ]

Multiple WMI events can be received concurrently, so multiple instances
of xiaomi_wmi_notify() can be active at the same time. Since the input
device is shared between those handlers, the key input sequence can be
disturbed.

Fix this by protecting the key input sequence with a mutex.

Compile-tested only.

Fixes: edb73f4f02 ("platform/x86: wmi: add Xiaomi WMI key driver")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20240402143059.8456-2-W_Armin@gmx.de
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-30 09:44:47 +02:00
..
chrome chrome-platform fixes for v6.9-rc4 2024-04-11 11:15:09 -07:00
goldfish platform: goldfish: move the separate 'default' propery for CONFIG_GOLDFISH 2024-03-07 21:47:48 +00:00
loongarch
mellanox platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check 2024-03-12 12:48:36 +02:00
mips mips: rs870e: stop exporting local functions 2023-12-10 17:21:39 -08:00
olpc
surface TTY/Serial driver update for 6.9-rc1 2024-03-21 12:44:10 -07:00
x86 platform/x86: xiaomi-wmi: Fix race condition when reporting key events 2024-05-30 09:44:47 +02:00
Kconfig
Makefile