]> 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:44:01 +0000 (09:44 +0200)
commitdae1ce27ceaea7e1522025b15252e3cc52802622
tree1c5472b92c51b450c61f096ca16a60498640b9a4
parentec00ea56450e22040f93033b8769e0db7ed554a2
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