Re: [PATCH] platform/x86: intel-hid: Protect ACPI notify handler against recursion

From: Ilpo Järvinen

Date: Wed Jun 10 2026 - 09:32:25 EST


On Sat, 06 Jun 2026 02:49:05 +0900, HyeongJun An wrote:

> Since commit e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on
> all CPUs") ACPI notify handlers like the intel-hid notify_handler() may
> run on multiple CPU cores racing with themselves.
>
> On convertibles and detachables (matched by DMI chassis-type 31 and 32 in
> dmi_auto_add_switch[]) the SW_TABLET_MODE input device is registered
> lazily from notify_handler() on the first tablet-mode event, via
> intel_hid_switches_setup(). When two such events race on different CPUs
> both can pass the !priv->switches check and register the priv->switches
> input device twice, resulting in a duplicate sysfs entry and a subsequent
> NULL pointer dereference.
>
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86: intel-hid: Protect ACPI notify handler against recursion
commit: c085d82613d5618814b84406c8b2d64f1bc305e7

--
i.