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 7667947143C; Tue, 21 Jul 2026 20:19:59 +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=1784665201; cv=none; b=kUNk83VK1yj996O1JO4Mn+1mWoEzsCA7wm9b5+nYkWM2YlcGY19b7YC3gLG1hzD5UgYgRZl7JGYxaAdTgnLg7OCM1WIFO5NxnFBmis5qkg65OHBBb+/Ti7PQ0QqNtyRjr4MTcL2IClbDPU+0siy/4tmn83qa4Wn6aS0ogNLfP40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784665201; c=relaxed/simple; bh=++GuvhL0OQf1zhSB5v5zM6K+npEXjfu9fOxHCs/vLuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UwiMopPBdFHoOR62SrkyCu8NP04Syn0PCBrDf4zbAX4quTZNwankXxs0XFTECdYl9WUIQ9Y6hfNPiiHXJv5KpMlZ5XA2ySpvE5XTQWMJw0aSjVXDh1oOauNrteyt+JxoBSTxlzVjSz0EJ3IVY4+wyMA4RUr/f+owSdrCB7S8Uas= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EjlPBXBd; 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="EjlPBXBd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BC411F00A3A; Tue, 21 Jul 2026 20:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784665199; bh=+W0wsI2e8Z2/gPj9wn4CwBhebax78ZQkUNbDBpG4h4w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EjlPBXBd87MSwQ4aU/nqW4L3DkZBQqNTcbpTWeA1G2a/dGn/QAmCa/WEIUBZlZXMW 1Ye/zkVegaZMx/9civBrB0wCZK8G+p4H0Q073RpmPTEARh975wSuljPyLmPdp9VdcI cma3mcy/mEpH6mH+hGI5rDc0thQg4m7eVCyCb+gE= 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 6.6 0213/1266] HID: wacom: stop hardware after post-start probe failures Date: Tue, 21 Jul 2026 17:10:50 +0200 Message-ID: <20260721152446.583773082@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152441.786066624@linuxfoundation.org> References: <20260721152441.786066624@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 6.6-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 @@ -2422,16 +2422,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) { @@ -2445,14 +2445,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; } } @@ -2461,7 +2461,7 @@ static int wacom_parse_and_register(stru return 0; -fail_quirks: +fail_hw_stop: hid_hw_stop(hdev); fail: wacom_release_resources(wacom);