Re: [PATCH RFC] dmaengine: fsl-edma: check channel acquisition before use
From: Vinod Koul
Date: Tue Sep 15 2026 - 13:38:03 EST
On Fri, 11 Sep 2026 14:09:02 +0800, Slavin Liu wrote:
> dma_get_slave_channel() can return NULL when acquiring a channel fails,
> for example if fsl_edma_alloc_chan_resources() cannot request an IRQ.
> fsl_edma3_xlate() dereferences that return value to update privatecnt.
>
> Acquire and check the channel before publishing its source ID and
> request parameters. A NULL-only check after the existing source-ID
> assignment would leave the failed request marked as in use, causing
> fsl_edma_srcid_in_use() to reject a subsequent request for that source.
> The channel resource-allocation callback does not consume these request
> parameters, so set them only after acquisition succeeds. The existing
> scoped mutex release and successful-channel return are preserved.
>
> [...]
Applied, thanks!
[1/1] dmaengine: fsl-edma: check channel acquisition before use
commit: bfd958664fccd794377a8adb74b492498c824643
Best regards,
--
~Vinod