(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

drivers: net: xgene: Fix dma_unmap_single() size

In xgene_enet_refill_bufpool(), the skb->data is dma-mapped with length len which is set to XGENE_ENET_STD_MTU which equals 1536. However, in xgene_enet_delete_bufpool(), the same buffer is unmapped with length XGENE_ENET_MAX_MTU which is 9600. This may erroneously unmap other DMA buffers or cause other issues. Change unmap length to XGENE_ENET_STD_MTU. Cc: stable+noautosel@kernel.org # LLM report + LLM fix, untested Fixes: a9380b0f7be8 ("drivers: net: xgene: Add support for Jumbo frame") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20261015124547.29996-2-fourier.thomas@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>


Author Thomas Fourier Committer Jakub Kicinski Date Commit Parent 4d0d8f49
+1 -1
1 changed file
+1 -1
1 changed file