[PATCH 0/2] platform/x86: asus-wmi: Serialize WMI evaluations and drop redundant rfkill lock

From: Marco Scardovi

Date: Fri Sep 18 2026 - 05:37:03 EST


ASUS WMI management methods share a single firmware/EC mailbox that is
not re-entrant. Concurrent evaluations from ACPI notify, sysfs, HID
callers (hid-asus, asus-armoury) and debugfs can trigger nested SMIs or
corrupt the mailbox.

This series serializes every ASUS_WMI_MGMT_GUID evaluation through a
global mutex, then drops the old per-device wmi_lock that only covered
WLAN rfkill hotplug.

The mutex is static because asus_wmi_evaluate_method() is exported and
callers outside asus-wmi have no struct asus_wmi. Fixes points at the
original shared evaluate helper rather than the later export, so stable
backports are not limited to kernels that carry that export.

Patch 1 introduces asus_wmi_evaluate_method_locked() and routes method3,
method5, method_buf and show_call through it.

Patch 2 removes the now-redundant wmi_lock and the pass-through
asus_rfkill_wlan_ops.

Link: https://github.com/OpenGamingCollective/asusctl/issues/328

Marco Scardovi (2):
platform/x86: asus-wmi: Serialize WMI method evaluations with a mutex
platform/x86: asus-wmi: Remove redundant per-device wmi_lock and
duplicate rfkill ops

drivers/platform/x86/asus-wmi.c | 67 +++++++++++----------------------
1 file changed, 23 insertions(+), 44 deletions(-)

--
2.55.0