From: "Verma, Devendra" <devverma@amd.com>
To: sashiko-reviews@lists.linux.dev
Cc: dmaengine@vger.kernel.org, vkoul@kernel.org, Frank.Li@kernel.org,
linux-pci@vger.kernel.org, devverma@amd.com
Subject: Re: [PATCH v4 2/2] dmaengine: dw-edma: Add changes to support Channel Separation
Date: Wed, 19 Aug 2026 14:52:20 +0530 [thread overview]
Message-ID: <093350e0-bb00-4e53-9feb-799c1f9ca16d@amd.com> (raw)
In-Reply-To: <20260819071929.300A01F000E9@smtp.kernel.org>
On 19-Aug-26 12:49, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>
> Pre-existing issues:
> - [High] Error paths in `dw_edma_pcie_probe()` return directly without freeing IRQ vectors allocated by `pci_alloc_irq_vectors()`, causing an IRQ resource leak.
> --
>
> --- Patch [2]: [PATCH v4 2/2] dmaengine: dw-edma: Add changes to support Channel Separation ---
> commit 801adc5a7230cabb747f37d2920f39c45fa66b9a
> Author: Devendra K Verma <devverma@amd.com>
>
> dmaengine: dw-edma: Add changes to support Channel Separation
>
> HDMA supports configurable DMA channel register space separation which ranges
> from 256B to 32KB. Current implementation supports 256B as default for DMA
> channel register space, while CPM6 uses 512B by default.
>
>> diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
>> index f287879b2cb9e..2eb8293b87b4c 100644
>> --- a/drivers/dma/dw-edma/dw-edma-pcie.c
>> +++ b/drivers/dma/dw-edma/dw-edma-pcie.c
>
> [ ... ]
>
>> @@ -436,6 +439,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
>> chip->nr_irqs = nr_irqs;
>> chip->ops = &dw_edma_pcie_plat_ops;
>> chip->cfg_non_ll = non_ll;
>> + chip->ch_space_sz = vsec_data->ch_space_sz;
>>
>> chip->ll_wr_cnt = vsec_data->wr_ch_cnt;
>> chip->ll_rd_cnt = vsec_data->rd_ch_cnt;
>
> [Severity: High]
> This isn't a bug introduced by this patch, but looking at the error paths
> just below this addition in dw_edma_pcie_probe():
>
> chip->reg_base = pcim_iomap_table(pdev)[vsec_data->rg.bar];
> if (!chip->reg_base)
> return -ENOMEM;
>
> Does this return directly without freeing the IRQ vectors allocated earlier
> by pci_alloc_irq_vectors()? Failing to call pci_free_irq_vectors() in error
> paths leaks IRQ resources, which can prevent future allocations and
> potentially exhaust system IRQ capacity.
>
This is an issue and shall be taken up in a separate patch series.
prev parent reply other threads:[~2026-08-19 9:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 7:09 [PATCH v4 0/2] CPM6 Channel Separation Support Devendra K Verma
2026-08-19 7:09 ` [PATCH v4 1/2] dmaengine: dw-edma: Enable Chan Separation via VSEC Devendra K Verma
2026-08-19 7:19 ` sashiko-bot
2026-08-19 9:17 ` Verma, Devendra
2026-08-19 7:09 ` [PATCH v4 2/2] dmaengine: dw-edma: Add changes to support Channel Separation Devendra K Verma
2026-08-19 7:19 ` sashiko-bot
2026-08-19 9:22 ` Verma, Devendra [this message]
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=093350e0-bb00-4e53-9feb-799c1f9ca16d@amd.com \
--to=devverma@amd.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox