Thread (11 messages) flat view 11 messages, 2 authors, 2026-07-20
STALE66d

Revision v2 of 2 in this series.

Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 0/5] Input: applespi - Fix probe timeout and use-after-free bugs

From: Shih-Yuan Lee <hidden>
Date: 2026-07-20 10:14:48
Also in: lkml

This patch series simplifies the applespi driver by making touchpad
detection and registration synchronous during probe, and fixes a
use-after-free bug in applespi_remove().

Changes since v1:
- Split the large touchpad registration patch into 4 distinct, single-purpose
  commits (wait queue consolidation & timeouts, async queue slots tracking,
  synchronous registration, and async probe preference) for better readability.
- Fixed a self-deadlock in applespi_async() where it attempted to acquire
  cmd_msg_lock while already held by applespi_notify() and other callers.
- Updated applespi_async() to assert the lock is held by the caller.
- Protected touchpad info flags under cmd_msg_lock in response handling.
- Simplified applespi_tp_dim_open() by removing redundant NULL checks.
- Overhauled GPE disabling and teardown order in applespi_remove() to prevent
  GPE interrupt storms and unbind deadlocks.
- Addressed reviewer feedback from Sashiko.

Shih-Yuan Lee (5):
  Input: applespi - use unified wait queue with timeouts for drain
  Input: applespi - track asynchronous SPI transfers in flight
  Input: applespi - register touchpad synchronously in probe
  Input: applespi - prefer asynchronous driver probing
  Input: applespi - fix use-after-free in applespi_remove()

 drivers/input/keyboard/applespi.c | 175 ++++++++++++++++++++++++------
 1 file changed, 140 insertions(+), 35 deletions(-)

-- 
2.39.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help