From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C276B3E5A0B for ; Mon, 20 Jul 2026 10:14:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542495; cv=none; b=dTyYA2TGpo4zu5P82A9qknxbmwH/XeAh/xpDzWOWSNXTBrwn2AfTqtC5sqx5vryZMIzCmT/IGb1lm61H3AyQXHBnKAfOghAvE0K9r7QwdQuqTUHeFiD1QAJqB+/9GInMqJUaBFyeQaZDkrkgnVei/boDvBVdSXX5/XfG7UnEjVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784542495; c=relaxed/simple; bh=c7stYBGDTiMxAAyVPwsitkZNDJvZL6GV9gusqMZ+Axs=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=HeA4luBWW+bZX9xMeHYXTXOmZjaBwV0K0bsXKANhGMoKjpfTWDC5jxTyrI/rDea/ZHMgycsC/xlYJvcY0YyIhKElUgqRdBYUaRwrI5uJNXw1wD18y2XCxC8pipZ0nN8UYtKEWawk/TRtmf9rjU0RgsGVGJ/hpjZoHKwN9DrbMF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-8485ef63b68so9586665b3a.1 for ; Mon, 20 Jul 2026 03:14:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784542481; x=1785147281; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SuMKE1uWiwj902HlgiIkBhdF1y5a/vGWxiJr/uifbSs=; b=hDvL9H+6J9q86GVJ317D6r1FpFC/rJv6hzUDmNFsdpQ8CM8avszqYclnIYes7zu4Jq mMYgnex2b3hAqIRQwG76ADszna2Mh8U/5+HCKrMFqZuoGayaNMwqOltWB9+cDqvVyZ6o J8vjeaqIb4wYhzDGxkO5UDyiE1KIOoLmNGH+5HHTGNotLCLeDuGUZSz7OT4eNslpbXpd Hhfe4455R22na0BsFKjMr91mORRmnrSrZQ20kcu9FT0ahSrSARvjq8zL7SujFMuYtIu3 rN4wJUUMQ+nzfdCY160BD4N1OZxM7TenIwuHRCg/EAcu7xTZeUy9vTqvp7ZuT+7XleDE z9eA== X-Forwarded-Encrypted: i=1; AHgh+RqMum8q8XE6K+GfAmEH2pMK1RrgWEsgHD/qMP0BciNwKJyEe0CM7skmePg/ytaeB48K9GMRe2HIWFTO1IU=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8g4oEFH92vaWGi83bvtn7s6WN/B3NogWYsYy2gV0/+EPsQ6Be 9MyFpzLEOnEBkthLA1AdeShogDCQcdQuXOpbmD3JhV869hGmhGgksRI= X-Gm-Gg: AfdE7clU9q30SiowQDnpxIsE+Qobq3V4bhBTyzxSY0CLKvbWOqqKdPous4waSQi1h1W Tzz29rIMNljrwxe13RjKx5kmUjS6byTdyRqP6oh5eUx9jhWBuBq1xqqjMSNr7IA+x2h49McwkB7 NBSczdYd6523DrF6skniQ19gGMGDMkqKOdVuFTPiB6PqQehymcq38KaRyBNJumcCaffDLYErCrP r3GEXiWiN3//bOhOA7S7CFLMPcka65RmCC4eVUXC150xZMRu9Ka3Jyd6KQt81MPhs3tY10pVlBY Hfy+C7m8MT+0aZtMmnYfLEgZihSfD5gp4VHFlt9kJFIjAhCSJMpQcPDEYOBAijfRSpZktE6vfPn /3Q3F2CD1pQZOgKq0+liXJKkL6nG5Y86MVQBZIFINozdT3b0KOHUFUymmYi5ggmMTIJ7RvGliAI Q8ej3NqeVcJvxaO6ouiPJTGj1yeO2eZSRNp9OSobW585fyLwyxTDFFPjil3VJzmUY57VTDNStY0 Da692yT1tSFSJ/Yiw== X-Received: by 2002:a05:6a00:94e8:b0:845:4928:8655 with SMTP id d2e1a72fcca58-84c294d0b5amr13409476b3a.39.1784542480867; Mon, 20 Jul 2026 03:14:40 -0700 (PDT) Received: from penguin.tail0a1999.ts.net (61-228-16-100.dynamic-ip.hinet.net. [61.228.16.100]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cb517f94c31sm4411321a12.13.2026.07.20.03.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 03:14:40 -0700 (PDT) From: Shih-Yuan Lee To: Dmitry Torokhov Cc: Mark Brown , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Shih-Yuan Lee Subject: [PATCH v2 0/5] Input: applespi - Fix probe timeout and use-after-free bugs Date: Mon, 20 Jul 2026 18:14:30 +0800 Message-Id: <20260720101435.13612-1-fourdollars@debian.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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