Re: [PATCH 0/8] platform/x86: thinkpad_acpi: clean up hotkey polling and locking
From: Ilpo Järvinen
Date: Tue Dec 01 2026 - 09:51:00 EST
On Wed, 25 Nov 2026 15:11:13 -0800, Dmitry Torokhov wrote:
> This series fixes a kthread lifecycle bug and cleans up hotkey NVRAM
> polling setup and locking in thinkpad_acpi:
>
> - Remove the unsafe early return on TPACPI_LIFE_EXITING in
> hotkey_kthread() so kthread_stop() never races with kthread exit.
> - Drop the dead -ENXIO check on hotkey_mask_set() in hotkey_init().
> - Drop obsolete tpacpi_lifecycle checks from hotkey_inputdev_open() and
> hotkey_inputdev_close(), fold hotkey_poll_setup() calls into existing
> hotkey_mutex critical sections, and remove hotkey_poll_setup_safe().
> - Call hotkey_poll_setup() in hotkey_user_mask_set() so that runtime
> hotkey mask updates via /proc/acpi/ibm/hotkey also start or stop the
> NVRAM polling thread.
> - Replace the HOTKEY_CONFIG_CRITICAL_START/END macros and manual
> hotkey_thread_data_mutex lock/unlock calls with scoped_guard().
> - Convert hotkey_thread_data_mutex to a spinlock.
> - Remove the unused hotkey_poll_active bitfield from tp_features.
> - Drop the redundant tpacpi_inputdev->dev.parent assignment in
> tpacpi_pdriver_probe().
>
> [...]
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.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/8] platform/x86: thinkpad_acpi: remove early exit in hotkey_kthread()
commit: 57a8c08d1a1754c650bd3231e1b0ae3dba8b2fd8
[2/8] platform/x86: thinkpad_acpi: drop dead -ENXIO check in hotkey_init()
commit: 8f008e16a04d9f39631fa9ebffda97272f43c287
[3/8] platform/x86: thinkpad_acpi: simplify hotkey open/close and poll setup
commit: b991111f67e6869e5bd6ca8397868dc055cda410
[4/8] platform/x86: thinkpad_acpi: update polling state in hotkey_user_mask_set()
commit: 55032974c266ca111544359578db147b26e98785
[5/8] platform/x86: thinkpad_acpi: use scoped_guard() for hotkey config locking
commit: be8e8e55ae6dfff9329596ed664d8dd5529e8270
[6/8] platform/x86: thinkpad_acpi: convert hotkey_thread_data_mutex to a spinlock
commit: b22af396571827456636206a0e094812b3f947ee
[7/8] platform/x86: thinkpad_acpi: remove unused hotkey_poll_active flag
commit: 3b1f032360c763ab7dac913cb6a5764a84ddb785
[8/8] platform/x86: thinkpad_acpi: drop redundant input device parent assignment
commit: 72e2c4ee317c507fd4cc81da0fa36e543b3d0244
--
i.