From: sashiko-bot@kernel.org
To: "Golla Nagendra" <nagendra.golla@amd.com>
Cc: dmaengine@vger.kernel.org, Frank.Li@kernel.org, vkoul@kernel.org
Subject: Re: [PATCH V2 2/8] dmaengine: zynqmp_dma: Free sw_desc_pool on desc_pool_v alloc failure
Date: Fri, 14 Aug 2026 05:14:44 +0000 [thread overview]
Message-ID: <20260814051444.A594A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814045616.1661199-3-nagendra.golla@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The IRQ handler accesses hardware registers without checking if the device is active, violating Runtime PM guidelines.
--
--- Patch [2]: [PATCH V2 2/8] dmaengine: zynqmp_dma: Free sw_desc_pool on desc_pool_v alloc failure ---
commit fa41ac69883ca2ff4e5d238f73142e53f1ec3b68
Author: Golla Nagendra <nagendra.golla@amd.com>
Subject: dmaengine: zynqmp_dma: Free sw_desc_pool on desc_pool_v alloc failure
This commit fixes a memory leak in zynqmp_dma_alloc_chan_resources() by
freeing the allocated sw_desc_pool if the subsequent desc_pool_v coherent
allocation fails. It adds a dedicated error label to ensure the software
descriptor pool is cleaned up before falling through to the runtime PM
rollback path.
> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
> index 9f1e69700dd02..b7c5612806948 100644
> --- a/drivers/dma/xilinx/zynqmp_dma.c
> +++ b/drivers/dma/xilinx/zynqmp_dma.c
[ ... ]
> static irqreturn_t zynqmp_dma_irq_handler(int irq, void *data)
> {
> struct zynqmp_dma_chan *chan = (struct zynqmp_dma_chan *)data;
> u32 isr, imr, status;
> irqreturn_t ret = IRQ_NONE;
>
> isr = readl(chan->regs + ZYNQMP_DMA_ISR);
> imr = readl(chan->regs + ZYNQMP_DMA_IMR);
[Severity: High]
This isn't a bug introduced by this patch, but does this interrupt handler
need to check the device's power state before accessing hardware registers?
During runtime suspend, the APB clock is disabled. If a spurious or
unexpected interrupt fires while the device is in this suspended state,
the handler executes and immediately reads ZYNQMP_DMA_ISR without calling
pm_runtime_get_if_active() to verify or resume the power state.
Could reading these registers while the clock is disabled cause a
synchronous external abort and lead to a system crash?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260814045616.1661199-1-nagendra.golla@amd.com?part=2
next prev parent reply other threads:[~2026-08-14 5:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 4:56 [PATCH V2 0/8] dmaengine: zynqmp_dma: Fix error paths and follow-up cleanups Golla Nagendra
2026-08-14 4:56 ` [PATCH V2 1/8] dmaengine: zynqmp_dma: Fix PM rollback on sw_desc_pool alloc failure Golla Nagendra
2026-08-14 5:13 ` sashiko-bot
2026-08-14 16:28 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 2/8] dmaengine: zynqmp_dma: Free sw_desc_pool on desc_pool_v " Golla Nagendra
2026-08-14 5:14 ` sashiko-bot [this message]
2026-08-14 17:09 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 3/8] dmaengine: zynqmp_dma: Fix chan probe/remove error handling Golla Nagendra
2026-08-14 18:21 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 4/8] dmaengine: zynqmp_dma: Fix stale kerneldoc comments Golla Nagendra
2026-08-14 5:12 ` sashiko-bot
2026-08-14 4:56 ` [PATCH V2 5/8] dmaengine: zynqmp_dma: Fix minor whitespace Golla Nagendra
2026-08-14 17:10 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 6/8] dmaengine: zynqmp_dma: Use of_dma_is_coherent for dma-coherent Golla Nagendra
2026-08-14 5:10 ` sashiko-bot
2026-08-14 17:11 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 7/8] dmaengine: zynqmp_dma: Reject zero-length memcpy transfers Golla Nagendra
2026-08-14 17:11 ` Frank Li
2026-08-14 4:56 ` [PATCH V2 8/8] dmaengine: zynqmp_dma: Remove unused define and duplicate IRQ bit Golla Nagendra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814051444.A594A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=nagendra.golla@amd.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.