Re: [PATCH RESEND] Avoid hw_desc array overrun in dw-axi-dmac

From: Vinod Koul
Date: Sun Apr 07 2024 - 12:40:30 EST



On Wed, 27 Mar 2024 10:49:24 +0000, Joao Pinto wrote:
> I have a use case where nr_buffers = 3 and in which each descriptor is composed by 3
> segments, resulting in the DMA channel descs_allocated to be 9. Since axi_desc_put()
> handles the hw_desc considering the descs_allocated, this scenario would result in a
> kernel panic (hw_desc array will be overrun).
>
> To fix this, the proposal is to add a new member to the axi_dma_desc structure,
> where we keep the number of allocated hw_descs (axi_desc_alloc()) and use it in
> axi_desc_put() to handle the hw_desc array correctly.
>
> [...]

Applied, thanks!

[1/1] Avoid hw_desc array overrun in dw-axi-dmac
commit: 333e11bf47fa8d477db90e2900b1ed3c9ae9b697

Best regards,
--
~Vinod