[PATCH net] net: ethernet: mtk_eth_soc: fix memory corruption during fq dma init

Simon Horman horms at kernel.org
Tue Oct 15 05:39:07 PDT 2024


On Tue, Oct 15, 2024 at 10:17:55AM +0200, Felix Fietkau wrote:
> The loop responsible for allocating up to MTK_FQ_DMA_LENGTH buffers must
> only touch as many descriptors, otherwise it ends up corrupting unrelated
> memory. Fix the loop iteration count accordingly.
> 
> Fixes: c57e55819443 ("net: ethernet: mtk_eth_soc: handle dma buffer size soc specific")
> Signed-off-by: Felix Fietkau <nbd at nbd.name>

Reviewed-by: Simon Horman <horms at kernel.org>



More information about the Linux-mediatek mailing list