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 BAB1E44AB6A; Tue, 21 Jul 2026 22:34:05 +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=1784673246; cv=none; b=VuPeMeDYFFJCJewYZcG03ny8h5ScSNbCxRAwI/q7zAQN2ZRZd8HWcDlQPruiBhALkhkNpbbhxezDe+0d5qQ3l7nHUG4lpgHIifpYEFKF0oGfUDeBXFF2X53AP2V1uPPey7QxqWsFYSN4spMT/EwXxM1Dbwz5Dx/JflybNo0wPDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784673246; c=relaxed/simple; bh=HhERMtwVHOLBzL/LKy4Kysd2Kd7kOPNgHaszZPfPP1I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AVYIP47NQ5HQ/f4eZgBe4qDua4o9A3EotySAhmNEdOZFPhcR83OTkK9VMMbbHHbAkuz+rgllH3vyRMdBejCI281rYGN8MrGlOZKnaxXH7KvLf7RmDvri+InRW/1IJqUpx5+rDXbkIomdfk8D4lWXdnMJLQOFPuQGezP41b8y6KU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I7WK3Ri3; 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="I7WK3Ri3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BC2E1F000E9; Tue, 21 Jul 2026 22:34:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784673245; bh=fJIPPAxtZ977TCM9ziypc0YRVpJ0s3FjSK/sXfOkG7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=I7WK3Ri3iTxtRCllsp7YML382ySscL/7wxpz5u1x291xcTC9yW6QXLKW8RkFf+l4f oOc1u0DDOdYLs3NuPKON7STe2ucToUQeSDglbiLJ6yMLFjD/rGITLN+Wy7KGENowN+ CBmU0e2DzGC3yDIPEXz5PEMC9siTOm7shZQF2Yb0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ijae Kim , Myeonghun Pak , Dmitry Torokhov , Jiri Kosina Subject: [PATCH 5.10 091/699] HID: wacom: stop hardware after post-start probe failures Date: Tue, 21 Jul 2026 17:17:30 +0200 Message-ID: <20260721152357.754021520@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152355.667394603@linuxfoundation.org> References: <20260721152355.667394603@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Myeonghun Pak commit ec2612b8ad9e642596db011dd8b6568ef1edeaa1 upstream. wacom_parse_and_register() starts HID hardware before registering inputs and initializing pad LEDs/remotes. Those later steps can fail, but their error paths currently release Wacom resources without stopping the HID hardware. Route post-hid_hw_start() failures through hid_hw_stop() before releasing driver resources. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: c1d6708bf0d3 ("HID: wacom: Do not register input devices until after hid_hw_start") Cc: stable@vger.kernel.org Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Reviewed-by: Dmitry Torokhov Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/wacom_sys.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -2427,16 +2427,16 @@ static int wacom_parse_and_register(stru error = wacom_register_inputs(wacom); if (error) - goto fail; + goto fail_hw_stop; if (wacom->wacom_wac.features.device_type & WACOM_DEVICETYPE_PAD) { error = wacom_initialize_leds(wacom); if (error) - goto fail; + goto fail_hw_stop; error = wacom_initialize_remotes(wacom); if (error) - goto fail; + goto fail_hw_stop; } if (!wireless) { @@ -2450,14 +2450,14 @@ static int wacom_parse_and_register(stru cancel_delayed_work_sync(&wacom->init_work); _wacom_query_tablet_data(wacom); error = -ENODEV; - goto fail_quirks; + goto fail_hw_stop; } if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) { error = hid_hw_open(hdev); if (error) { hid_err(hdev, "hw open failed\n"); - goto fail_quirks; + goto fail_hw_stop; } } @@ -2466,7 +2466,7 @@ static int wacom_parse_and_register(stru return 0; -fail_quirks: +fail_hw_stop: hid_hw_stop(hdev); fail: wacom_release_resources(wacom);