Re: [PATCH 4/4] platform/x86: wmi: Fix notify callback locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 3 Jan 2024, Armin Wolf wrote:

> 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@xxxxxx>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>

-- 
 i.

[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux