mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/x86: asus-wmi: Serialize WMI evaluations and drop redundant rfkill lock
@ 2026-09-18  9:14 Marco Scardovi
  2026-09-18  9:14 ` [PATCH 1/2] platform/x86: asus-wmi: Serialize WMI method evaluations with a mutex Marco Scardovi
  2026-09-18  9:15 ` [PATCH 2/2] platform/x86: asus-wmi: Remove redundant per-device wmi_lock and duplicate rfkill ops Marco Scardovi
  0 siblings, 2 replies; 3+ messages in thread
From: Marco Scardovi @ 2026-09-18  9:14 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, Hans de Goede, Ilpo Järvinen, Luke D . Jones,
	Denis Benato, Corentin Chary, stable

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-18  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18  9:14 [PATCH 0/2] platform/x86: asus-wmi: Serialize WMI evaluations and drop redundant rfkill lock Marco Scardovi
2026-09-18  9:14 ` [PATCH 1/2] platform/x86: asus-wmi: Serialize WMI method evaluations with a mutex Marco Scardovi
2026-09-18  9:15 ` [PATCH 2/2] platform/x86: asus-wmi: Remove redundant per-device wmi_lock and duplicate rfkill ops Marco Scardovi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®