Re: [PATCH] dma: at_xdmac: fix a missing check on list iterator

From: Vinod Koul
Date: Mon Apr 11 2022 - 09:34:46 EST


On 27-03-22, 14:11, Xiaomeng Tong wrote:
> The bug is here:
> __func__, desc, &desc->tx_dma_desc.phys, ret, cookie, residue);
>
> The list iterator 'desc' will point to a bogus position containing
> HEAD if the list is empty or no element is found. To avoid dev_dbg()
> prints a invalid address, use a new variable 'iter' as the list
> iterator, while use the origin variable 'desc' as a dedicated
> pointer to point to the found element.

Applied, thanks

--
~Vinod