From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3F3E4BA9E1 for ; Tue, 29 Sep 2026 08:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790671603; cv=none; b=FvaIQQdVizSBGYr8g9NZ8prkCBpI+KriN0m5OOd6LvnGn46SR2bFv9tfbuKQVPcA6bkDDkcQzOVdzvaJwRrBoJz4vmdQ8gCTrQObXbEelmu2CogvU3Exrfzvj4ZcYXuVycMTQViWnSV1G1ChwoGul6L9HhdAqd3z/9Zw8DyVudQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790671603; c=relaxed/simple; bh=trqdyJ4EclmvJSO8qF0bj5Uhoh7fjZoseQOGzCCBuXc=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=PI2wIe9oB22OJNoDko3Tluz6P1VS8WQYj4udEyNgYJUccteRlG77FVPs+lAvggNWrVJzTMgMkanRCxrjwYrjBb1C+f8Oe3KFgHCZYpuQ2CMfJBCQrWnJ2ADtfu96I5WNHCH73r4ZB9ERiR5IEbgFCwLd9G3AHevSpB4YodmWJ8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KNeXyBMN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KNeXyBMN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A5E01F00893; Tue, 29 Sep 2026 08:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790671594; bh=VFcJ5IBBmhTsQC+YBtpLYN2YGvKs6MQC/+VL1er+F68=; h=Subject:To:Cc:From:Date; b=KNeXyBMN1OqvOEj5nP76dYmEKLM5Ab22F1qQdDzS/dyPCrymGtzHAk2joV0mRx+i6 1AeC0IRwOAZV2eOuWueUOck3RaFwJytukgXbxNg5j54Zam96v6hzbJaZsBhcowsRPT XWIyO0JlikDw7MtUv92kcev3Dc3eFhYTSHHJ7z/U= Subject: FAILED: patch "[PATCH] HID: alps: unregister DualPoint Stick input device on remove" failed to apply to 6.12-stable tree To: chenchangcheng@kylinos.cn,jkosina@suse.com Cc: From: Date: Tue, 29 Sep 2026 10:43:55 +0200 Message-ID: <2026092955-onto-scouring-df20@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x aa9dde93e05a837645fdfd577eea71f0733f0694 # git commit -s git send-email --to '' --in-reply-to '2026092955-onto-scouring-df20@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From aa9dde93e05a837645fdfd577eea71f0733f0694 Mon Sep 17 00:00:00 2001 From: Chen Changcheng Date: Fri, 14 Aug 2026 15:06:20 +0800 Subject: [PATCH] HID: alps: unregister DualPoint Stick input device on remove alps_input_configured() allocates a second input device ("DualPoint Stick") with input_allocate_device() and registers it, but the alps_driver struct has no .remove handler and input2 is not tracked in hdev->inputs. The default remove path (hid_hw_stop -> hidinput_disconnect) only iterates hdev->inputs, so input2 is never unregistered and leaks on every device removal. Add a .remove handler that stops the device first (preventing URB callbacks from touching input2 during teardown) and then unregisters input2. Fixes: 2562756dde55 ("HID: add Alps I2C HID Touchpad-Stick support") Cc: stable@vger.kernel.org Signed-off-by: Chen Changcheng Signed-off-by: Jiri Kosina diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 67179e3fe39b..370635f5b704 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -823,6 +823,24 @@ static int alps_probe(struct hid_device *hdev, const struct hid_device_id *id) return 0; } +static void alps_remove(struct hid_device *hdev) +{ + struct alps_dev *data = hid_get_drvdata(hdev); + + /* + * input2 ("DualPoint Stick") is allocated separately and is not + * tracked in hdev->inputs, so the default remove path + * (hid_hw_stop -> hidinput_disconnect) does not unregister it. + * + * Stop the device first so that no URB callback can touch input2 + * while it is being unregistered, then drop it explicitly. + */ + hid_hw_stop(hdev); + + if (data->input2) + input_unregister_device(data->input2); +} + static const struct hid_device_id alps_id[] = { { HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1_DUAL) }, @@ -845,6 +863,7 @@ static struct hid_driver alps_driver = { .input_configured = alps_input_configured, .resume = pm_ptr(alps_post_resume), .reset_resume = pm_ptr(alps_post_reset), + .remove = alps_remove, }; module_hid_driver(alps_driver);