Netdev List
 help / color / mirror / Atom feed
* [PATCH net] net: ethernet: mtk_eth_soc: Fix potential PPE hash table leak
@ 2026-11-12 13:59 Guangshuo Li
  2026-11-12 14:02 ` netdev-bot+sinfo
  2026-11-12 14:55 ` Lorenzo Bianconi
  0 siblings, 2 replies; 3+ messages in thread
From: Guangshuo Li @ 2026-11-12 13:59 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Matthias Brugger,
	AngeloGioacchino Del Regno
  Cc: netdev, linux-kernel, linux-arm-kernel, linux-mediatek

The remove path does not destroy the PPE L2 flow hash tables. Their
bucket tables are not device-managed and remain allocated when the PPE
objects are released.

Call mtk_ppe_deinit() after unregistering the netdevs and cancelling the
driver work, as the probe error path already does.

This issue was found by our static analysis tool under development.

Fixes: 33fc42de3327 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries")
Signed-off-by: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ad0fdc4133fb..08973b6f0711 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -5426,6 +5426,7 @@ static void mtk_remove(struct platform_device *pdev)
 	netif_napi_del(&eth->rx_napi);
 	mtk_cleanup(eth);
 	free_netdev(eth->dummy_dev);
+	mtk_ppe_deinit(eth);
 	mtk_mdio_cleanup(eth);
 }
 

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-12 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 13:59 [PATCH net] net: ethernet: mtk_eth_soc: Fix potential PPE hash table leak Guangshuo Li
2026-11-12 14:02 ` netdev-bot+sinfo
2026-11-12 14:55 ` Lorenzo Bianconi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox