diff options
author | Armin Wolf <W_Armin@gmx.de> | 2024-01-03 20:27:07 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2024-01-22 11:34:30 +0100 |
commit | 29e473f4b51ee56b5808323e274a8369b4d181cb (patch) | |
tree | 6ba0785f8fcef6353fb537e48d94d06e29fa978e /scripts/Makefile.btf | |
parent | 3ea7f59af8ffa17ce5f5173d6f4bfbc73334187d (diff) | |
download | linux-stable-29e473f4b51ee56b5808323e274a8369b4d181cb.tar.gz linux-stable-29e473f4b51ee56b5808323e274a8369b4d181cb.tar.bz2 linux-stable-29e473f4b51ee56b5808323e274a8369b4d181cb.zip |
platform/x86: wmi: Fix notify callback locking
When an legacy WMI event handler is removed, an WMI event could
have called the handler just before it was removed, meaning the
handler could still be running after wmi_remove_notify_handler()
returns.
Something similar could also happens when using the WMI bus, as
the WMI core might still call the notify() callback from an WMI
driver even if its remove() callback was just called.
Fix this by introducing a rw semaphore which ensures that the
event state of a WMI device does not change while the WMI core
is handling an event for it.
Tested on a Dell Inspiron 3505 and a Acer Aspire E1-731.
Fixes: 1686f5444546 ("platform/x86: wmi: Incorporate acpi_install_notify_handler")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240103192707.115512-5-W_Armin@gmx.de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'scripts/Makefile.btf')
0 files changed, 0 insertions, 0 deletions