]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug
authorArmin Wolf <W_Armin@gmx.de>
Mon, 14 Apr 2025 14:04:53 +0000 (16:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:48:04 +0000 (10:48 +0200)
commit6ea2e8743ed163d2ab19bc65d0b12925dc5bb00f
tree977d5f9336eb2fd021df7ebf217068b251ff3cd1
parent1c9e272f98673e4d04edbdcbf5cd7e0c82835142
platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug

commit baf2f2c2b4c8e1d398173acd4d2fa9131a86b84e upstream.

The ACPI byte code inside the ACPI control method responsible for
handling the WMI method calls uses a global buffer for constructing
the return value, yet the ACPI control method itself is not marked
as "Serialized".
This means that calling WMI methods on this WMI device is not
thread-safe, as concurrent WMI method calls will corrupt the global
buffer.

Fix this by serializing the WMI method calls using a mutex.

Cc: stable@vger.kernel.org # 6.x.x: 912d614ac99e: platform/x86: msi-wmi-platform: Rename "data" variable
Fixes: 9c0beb6b29e7 ("platform/x86: wmi: Add MSI WMI Platform driver")
Tested-by: Antheas Kapenekakis <lkml@antheas.dev>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250414140453.7691-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/wmi/devices/msi-wmi-platform.rst
drivers/platform/x86/msi-wmi-platform.c