]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: lan743x: Fix memleak issue when GSO enabled
authorThangaraj Samynathan <thangaraj.s@microchip.com>
Tue, 29 Apr 2025 05:25:27 +0000 (10:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:41:42 +0000 (09:41 +0200)
commita0e0efbabbbe6a1859bc31bf65237ce91e124b9b
tree546773417a32ef2622fa4d7bcc2572a2dbd6a143
parent44c3f30c8e206fd2ef248c40df40f5045c2f389d
net: lan743x: Fix memleak issue when GSO enabled

[ Upstream commit 2d52e2e38b85c8b7bc00dca55c2499f46f8c8198 ]

Always map the `skb` to the LS descriptor. Previously skb was
mapped to EXT descriptor when the number of fragments is zero with
GSO enabled. Mapping the skb to EXT descriptor prevents it from
being freed, leading to a memory leak

Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250429052527.10031-1-thangaraj.s@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/microchip/lan743x_main.h