From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Armin Wolf <W_Armin@gmx.de>
Cc: Hans de Goede <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4] platform/x86: wmi: Fix notify callback locking
Date: Thu, 4 Jan 2024 20:15:54 +0200 (EET) [thread overview]
Message-ID: <7ab5e3e6-b8c2-bc57-c12f-b77ed06b84de@linux.intel.com> (raw)
In-Reply-To: <20240103192707.115512-5-W_Armin@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
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@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2024-01-04 18:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-03 19:27 [PATCH 0/4] platform/x86: wmi: Event handling fixes Armin Wolf
2024-01-03 19:27 ` [PATCH 1/4] platform/x86: wmi: Fix error handling in legacy WMI notify handler functions Armin Wolf
2024-01-04 18:10 ` Ilpo Järvinen
2024-01-03 19:27 ` [PATCH 2/4] platform/x86: wmi: Return immediately if an suitable WMI event is found Armin Wolf
2024-01-04 18:13 ` Ilpo Järvinen
2024-01-03 19:27 ` [PATCH 3/4] platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list Armin Wolf
2024-01-04 18:14 ` Ilpo Järvinen
2024-01-03 19:27 ` [PATCH 4/4] platform/x86: wmi: Fix notify callback locking Armin Wolf
2024-01-04 18:15 ` Ilpo Järvinen [this message]
2024-01-08 14:00 ` [PATCH 0/4] platform/x86: wmi: Event handling fixes Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ab5e3e6-b8c2-bc57-c12f-b77ed06b84de@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox