From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Nick <nick@kousu.ca>,
Saket Dumbre <saket.dumbre@intel.com>,
Pawel Chmielewski <pawel.chmielewski@intel.com>,
Mario Limonciello <superm1@kernel.org>
Subject: [PATCH v2 0/3] ACPI: button: Fixes related to GPE handling and probe error path
Date: Fri, 22 May 2026 16:48:41 +0200 [thread overview]
Message-ID: <2046403.PYKUYFuaPT@rafael.j.wysocki> (raw)
Hi All,
This is an update of
https://lore.kernel.org/linux-acpi/5996185.DvuYhMxLoT@rafael.j.wysocki/
sent to address sashiko.dev feedback on patch [2/3]:
> > @@ -106,8 +109,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device,
> > u32 gpe_number)> >
> > */
> >
> > gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
> > if (gpe_event_info) {
> >
> > - if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
> > - ACPI_GPE_DISPATCH_NONE) {
> > + if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) & dispatch_type_mask)
> > {
>
> Does this incorrectly treat sequential enumeration values as bit flags?
> ACPI_GPE_DISPATCH_METHOD is defined as 1, and ACPI_GPE_DISPATCH_NOTIFY is 3.
> Since dispatch_type_mask is passed as ACPI_GPE_DISPATCH_METHOD (1) from
> acpi_button_probe(), this bitwise AND evaluates to true for both METHOD
> (1 & 1 == 1) and NOTIFY (3 & 1 == 1).
> Could this unintentionally enable GPEs for NOTIFY handlers?
The original series description below still applies.
This series fix three issues related to the ACPI button driver,
one introduced during the 6.15 development cycle, one from the 7.0
cycle, and one that has been there for a long time, but has been
omitted by mistake by a recent commit.
Thanks!
next reply other threads:[~2026-05-22 14:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 14:48 Rafael J. Wysocki [this message]
2026-05-22 14:49 ` [PATCH v2 1/3] ACPI: button: Fix ACPI GPE handler leak during removal Rafael J. Wysocki
2026-05-22 14:52 ` [PATCH v2 2/3] ACPI: button: Enable wakeup GPEs for ACPI buttons at probe time Rafael J. Wysocki
2026-05-23 2:15 ` Nick
2026-05-23 17:29 ` Rafael J. Wysocki
2026-05-22 14:53 ` [PATCH v2 3/3] ACPI: button: Add missing device class clearing on probe failures Rafael J. Wysocki
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=2046403.PYKUYFuaPT@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@kousu.ca \
--cc=pawel.chmielewski@intel.com \
--cc=saket.dumbre@intel.com \
--cc=superm1@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
all inboxes | Powered by JetHome®