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=1796388976; b=qVht1RrIh9Q96wXkx0NLBDhmn9qZM337Ld+eEVgeBPbw7jPtXPm2Uc3M+J4esnm8Cgyq Zi49/vMkBNql3gEY+s6GlMp02g7TkpQwDteoRy9wTVPJyIdfcKpQcd57zvoWI8e0AXVYX lzWXomIvlnLsUWAGqUtRVzsM1ULGhNpmejGuwzUZ2UOoV0qbbNrUAG3Hcd/EhbPM2jBa9 TuXcKbjX089chDCaQ+ttkv86eJwNwHz6PDDfDWegufW4x/OiXrwC36VmLypc6q8Fu8FKC 3hGg914BCctoWsXjWChLURuHydze3/swOtNeZXfsu/TPi0j4HqUXZfpiZ7FNe3Sj/7g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388976; 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=zeo0JMYBW4Lq8Bfgo9uR+SQ1lJWOxH0ikZiRzcDyyWA=; b=OZ/6v9gmIiKbOsZZo3D8ElapX5xXL3gPkVs60JnNGX0RYQyEmqDadZ/EZXr11N/a2Mxo xn+WhCuf2MfdUnnhtcFmBCb1de+nOl+NC6kv3ohCtoa0LwbUZeDXktGpAqWKGSwt8jv45 cubGA50UVB9pR2OBkJtwFGJfMj+d6WXRCq/dyfqVjuURbefdBubTADp4uDnyDj0kSiYsa 6l4SxIWopUWgAOM6mel2V4nrK8qQz/9U1Ab7gVBPFyfM9FUCjuVfHMZFjKIFIspuo285k EpoedLo2AAPi4V7MamgPLdfegFq5h7Cye8yY92vi1zorFAoz6RSTjePKFHZ1NHSlV7Q== 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=St8GmeTb; 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 EBE13606A32C; Fri, 4 Dec 2026 12:56:15 +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=St8GmeTb Received: by smtp.kernel.org (Postfix) with ESMTPSA id 117A41F000C2; Fri, 4 Dec 2026 12:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388975; bh=zeo0JMYBW4Lq8Bfgo9uR+SQ1lJWOxH0ikZiRzcDyyWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=St8GmeTbyOJX8oEDtBQDVPxgwUz1bmbAEM+VB/KYYZOH0mAmgprSA+BYsKluZVM2C WFqmPJgByiiZJwKhKzqpZroNdqcmS2L5hD6hr/6gj9VBm5T9CXKmoj666SAy1rPmog l4lvD/GAfTjHLONCn40AOHXAnfzqJbQkbtQhpBgk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Koichiro Den , Wolfram Sang , Frank Li , Vinod Koul , Sasha Levin Subject: [PATCH 6.1 0820/1059] dmaengine: rcar-dmac: Add missing dma_descriptor_unmap() Date: Fri, 4 Dec 2026 19:05:51 +0900 Message-ID: <20261204100705.268802913@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Koichiro Den [ Upstream commit 0ca154b10168d8874b871edf5510640c51b326c3 ] Call dma_descriptor_unmap() right before dma_cookie_complete() in the threaded IRQ completion path. Without this, streaming DMA mappings attached to the descriptor are never released and may eventually exhaust DMA mapping resources (e.g. IOVA with an IOMMU or bounce-buffer slots with SWIOTLB), leading to dma_map_* failures. Also ensure dma_descriptor_unmap() is called in rcar_dmac_chan_reinit() (error/terminate path) to avoid the same type of leaks. Fixes: 87244fe5abdf ("dmaengine: rcar-dmac: Add Renesas R-Car Gen2 DMA Controller (DMAC) driver") Signed-off-by: Koichiro Den [wsa: moved unmap before cookie completion, added Fixes tag] Signed-off-by: Wolfram Sang Reviewed-by: Frank Li Link: https://patch.msgid.link/20261012123020.11320-7-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, 2 insertions(+) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 046920ed514e4..84cecbb3efe53 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -842,6 +842,7 @@ static void rcar_dmac_chan_reinit(struct rcar_dmac_chan *chan) list_for_each_entry_safe(desc, _desc, &descs, node) { list_del(&desc->node); + dma_descriptor_unmap(&desc->async_tx); rcar_dmac_desc_put(chan, desc); } } @@ -1651,6 +1652,7 @@ static irqreturn_t rcar_dmac_isr_channel_thread(int irq, void *dev) while (!list_empty(&chan->desc.done)) { desc = list_first_entry(&chan->desc.done, struct rcar_dmac_desc, node); + dma_descriptor_unmap(&desc->async_tx); dma_cookie_complete(&desc->async_tx); list_del(&desc->node); -- 2.53.0