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 03E092D3A69; Sun, 7 Jun 2026 10:37:25 +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=1780828646; cv=none; b=LLoktMWieTUb+VCnDOfEWiQZwH/fiIUu+AxSKuK/kpNdQxdkx5GjLcDMDmifQHLcmLvGSvJxbNd8fAjH6PGN7oFhQl8CZDwf4iV2mBhLQ1kVa5IofjLqdU94wdEa7fpjVFFjJK7l7Ox2Njp9LOFOmWp4tXO5oE8S7OxLQ51dk+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780828646; c=relaxed/simple; bh=ObnFX0cNloHPruCqgGv+rgLCfU3bMaZSuD62TxFW4YQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TQ1z0K83Cr8D9169+Ooe6g1d5Eyo7nV/vEogvnmYwMsDV+FjjZcRx3UiUo1k7Fu34mI9q60lKZsAZKfBBfIo1R7gdR9UDtlJxtWAxe9hvBSvIfH6nJiar5UvRgZ7Z4d3N6/aczCn33w/mRKSoVHLhGMor4P5UtcWn3yFyDlRckE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sTMYdjwl; 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="sTMYdjwl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F9A01F00893; Sun, 7 Jun 2026 10:37:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780828645; bh=i5wFbjk2Lq9RKJ9660FuW3rAGjrcop0jvjF9amEHNOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sTMYdjwlQTncSaQdh0CwafAXxpvzFkCUKmKOHm7vOafNv3KeiG0NvdY4zREUtZcLf sLF5fXH0I/YmS5B24n5OuKHivdsuW8kTDU+pqV+VPfN0dD97R7Zvz1U6O6BnAGYRIO UFEizsc0Tp6/izd8xuTYUOX9WFwUR4pKPePuXaFE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , sashiko-bot , Peter Chen Subject: [PATCH 6.18 179/315] usb: cdns3: plat: fix unbalanced pm_runtime_forbid() call permanently leaks the runtime PM usage counter across bind/unbind cycles Date: Sun, 7 Jun 2026 11:59:26 +0200 Message-ID: <20260607095734.156455258@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260607095727.528828913@linuxfoundation.org> References: <20260607095727.528828913@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Chen commit ae6f3b82324e4f39ad8443c9020787e6fc889637 upstream. Call pm_runtime_allow(dev) conditionally at cdns3_plat_remove. Fixes: f738957277ba ("usb: cdns3: Split core.c into cdns3-plat and core.c file") Cc: stable Reported-by: sashiko-bot Closes: https://lore.kernel.org/linux-devicetree/agKaEePSFknhDBg2@nchen-desktop/T/#m21e1d9c1574eb127ce03c0c2a1a49002ce435b52 Signed-off-by: Peter Chen Link: https://patch.msgid.link/20260513085310.2217547-3-peter.chen@cixtech.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/cdns3/cdns3-plat.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/usb/cdns3/cdns3-plat.c +++ b/drivers/usb/cdns3/cdns3-plat.c @@ -186,6 +186,9 @@ static void cdns3_plat_remove(struct pla struct device *dev = cdns->dev; pm_runtime_get_sync(dev); + if (!(cdns->pdata && (cdns->pdata->quirks & CDNS3_DEFAULT_PM_RUNTIME_ALLOW))) + pm_runtime_allow(dev); + pm_runtime_disable(dev); pm_runtime_put_noidle(dev); cdns_remove(cdns);