Skip to content

platform/x86: asus-wmi: Serialize WMI evaluations and drop redundant rfkill lock

Marco Scardovi lkml platform-driver-x86 stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2platform/x86: asus-wmi: Serialize WMI method evaluations with a mutexdrivers/platform/x86/asus-wmi.c+21 -90 replies
2/2platform/x86: asus-wmi: Remove redundant per-device wmi_lock and duplicate rfkill opsdrivers/platform/x86/asus-wmi.c+2 -350 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDenis BenatoArmin Wolf
SeriesR-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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.

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(-)
Signature · 1 line
2.55.0