From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796383864; b=irWVxkPKrO9oxClis2mdj7IFgvR0t7i3/lmtEMBWPIn2V6rPv/RHsUD9Xu6yzBrE6sYo bMLAwq/5cbvGXrk3nOxsirXKpkX7PlIK1KGpgDav0VIMMENTLrAA91/0OOQe6AK3whwYL 3ktVIs0B/opEdXvpyjwpOmnj75pWMG9isxCkOUKpUgBel7Ta4cyc+wsMmqVADxMRUHUHd SaY5mZYxYqcM+DarZAc27ngk02tT5JnSMR7vZcYaQoxpW7MnYNPY3JPaokn9UL5YeXJjV hvGtxdMATK6JlLqFc6VGXOZau6sWbCdtxrLRvLlOSbLoZtv2xTJY4wBBh4IYaXYA/Pw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383864; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=5eb65ClbKW87P1xz9eUXYqemIlFjT+x2MS3P13ET1MI=; b=FCyUEJsfehOQ+9oLn18wEadTYPa8hvd0+2YmgvDRKTqgI6PkDkZdN3lSTpI2zx8rwgEO TH0cBQ0u1bdk8AJ9nAdY39iyd+1JwUV1a/J427incYCmAoaqwbK0IgzjpZLLxX2dVODxu dXnLxHS2LRMt+QUzFQDNzpEaEzr4qVeQwiv3sFwFIdhx/rdlcbXy/z8ToXYTcE1PN3qVM aG5HjnxSJfElY4HCwA1O5m3eVjIRzZIFBvTHjra01UHuFP5kv89r3KmhFgFq/K+4K6GIO 0rz6Jd9g1Y7JAk4HyNWSWMarXmStc/hnlTZ0B/uAYkTwq2BltZ7Vd1XALAWOullj3qQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rx9c83YM; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BE3F606A322; Fri, 4 Dec 2026 11:31:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rx9c83YM Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97C161F000C2; Fri, 4 Dec 2026 11:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383864; bh=5eb65ClbKW87P1xz9eUXYqemIlFjT+x2MS3P13ET1MI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rx9c83YMDNvRxG51hzWPl8ZNktULPYHr6Muc6EGm6Dk0UR71K1HrrK5sfNxQB5BcO T5mbE3VpRKPDJBp+61mTsHw6o3jqB2KBCLgWKxFlj4l5N12hIwmHjqOLti3gJKK8AY RDFtNhMhSluU8Wrkcf7sAzHKX6YsME9dwXghiVZE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Dmitry Torokhov Subject: [PATCH 6.12 399/555] Input: cyapa - fix runtime PM leak in cyapa_update_rt_suspend_scanrate() Date: Fri, 4 Dec 2026 19:07:22 +0900 Message-ID: <20261204100624.822027316@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang commit f5f8cc539f8b2bd5324c03dfce8cca57284653e6 upstream. pm_runtime_get_sync() unconditionally increments the runtime PM usage counter. If mutex_lock_interruptible() is interrupted, the function returns without dropping that reference, so the usage count stays elevated for as long as the driver is bound and the device can no longer be autosuspended. Drop the reference on the error path. Use pm_runtime_put_autosuspend() rather than the synchronous variant there: nothing has been done to the device on this path, so there is nothing to wait for, and with the 2 s autosuspend delay the driver configures the put only arms the autosuspend timer instead of suspending the device. Fixes: 672865080a8f ("Input: cyapa - add runtime power management support") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Link: https://patch.msgid.link/1794120347.2701234.vulab@iscas.ac.cn Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/cyapa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/input/mouse/cyapa.c +++ b/drivers/input/mouse/cyapa.c @@ -904,8 +904,10 @@ static ssize_t cyapa_update_rt_suspend_s pm_runtime_get_sync(dev); error = mutex_lock_interruptible(&cyapa->state_sync_lock); - if (error) + if (error) { + pm_runtime_put_autosuspend(dev); return error; + } cyapa->runtime_suspend_sleep_time = min_t(u16, time, 1000); cyapa->runtime_suspend_power_mode =