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=1796381837; b=axdv5rozRzhnMt9kf1mx8Bc3ZEIhRk27i745HNDvOpRv50bTxtlFAdzYMD01nnYV+n8F cZB8BpRJGnZZwrVde3A8fkGun0SSQdEcQxzRamjX0/OflIhNztPonsmBhvmVDxmahyDpj ZK362hAtW9awegOCEd03Mqzj8z1obMz/X2epgBQ1U6R0Abt+A1+QFP/hhCNO9AnbCimXK rgoAKkcwymUQtFgtRYAO7HzZTcVBypkIEySLSCvPzw4XWoY306SUcRlnvhwG7zkkc4rS4 E7UHF8FoQQwpLQ+32cQ/CsOwKQdsbq58YoHTDu7nswVF/QcKsVwrhlf3kLZ5D+maAsw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381837; 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=aZqhF5P6qEbwZpClO4fBMBwagzp28ZTknFXOn1bP4d8=; b=fpiavom7ceomTmDyxQUkLgEsE4e4hnTi8pKTUn4LQd1ExLcSV/t+qEpe3pt5xXPTcIVy C17jjh7Dn/9OJASA44AmMEIxFpXQ8fJ4GsmAbuVffybiH5zgUq4tzh1NSx/mJ4eA8U1RF BII/iUgTg40m6jA951ejkfuT0yQekk6s9gKeL2m0hTizG3AX3l83uAvNRLw/CKHR4HVeT h2zuzQSUv6fEnusDtu9A95pKyStdilsZDgkmx6EIiGu80Tknjeanc/eOZc/rPA99SteWy Jc4VdC4fDwb0eQsEE6P4ZkVrvWpP5JpVxrdkq2ib5tQkR34crdRiY9z2bCCb37Q9QqA== 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=sj+qV7O9; 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 86B4C606A332; Fri, 4 Dec 2026 10:57:17 +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=sj+qV7O9 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00E091F00931; Fri, 4 Dec 2026 10:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381837; bh=aZqhF5P6qEbwZpClO4fBMBwagzp28ZTknFXOn1bP4d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sj+qV7O9/QBXRopInVUHLxWmEjsw4JjP8c/MXfUEimppLyOJ+jgRzIp1Dj+Gb4o5r Nvtafx+RJMzHt7PDmPjbYHuZ0BybClxCKQiKEHjy0x4OciS8ikG6HphD0WWsOXjY5c 5pXDzvvF2rY3bqZrL/i/glaSIaYoVQmxLn26JaAQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhang Shurong , Geert Uytterhoeven , Frank Li , Laurent Pinchart , Wolfram Sang , Vinod Koul , Sasha Levin Subject: [PATCH 6.18 196/703] dmaengine: rcar-dmac: Fix PM usage counter imbalance Date: Fri, 4 Dec 2026 19:01:35 +0900 Message-ID: <20261204100633.068373922@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhang Shurong [ Upstream commit d3c108c095712a3b7eab292ef7ea9a57ff5cd5d7 ] pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 87244fe5abdf ("dmaengine: rcar-dmac: Add Renesas R-Car Gen2 DMA Controller (DMAC) driver") Signed-off-by: Zhang Shurong Reviewed-by: Geert Uytterhoeven Reviewed-by: Frank Li Reviewed-by: Laurent Pinchart Signed-off-by: Wolfram Sang Link: https://patch.msgid.link/20261012123020.11320-6-wsa+renesas@sang-engineering.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/sh/rcar-dmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 0c45ce8c74aa2..c1ce3b0ae74da 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1068,7 +1068,7 @@ static int rcar_dmac_alloc_chan_resources(struct dma_chan *chan) if (ret < 0) return -ENOMEM; - return pm_runtime_get_sync(chan->device->dev); + return pm_runtime_resume_and_get(chan->device->dev); } static void rcar_dmac_free_chan_resources(struct dma_chan *chan) -- 2.53.0