mtk_ppe_init() initializes the l2_flows rhashtable for each PPE instance. The probe failure path releases these resources with mtk_ppe_deinit(). However, after a successful probe, mtk_remove() tears down the network devices without calling mtk_ppe_deinit(), leaving the PPE rhashtable resources allocated. Call mtk_ppe_deinit() during device removal before freeing the network devices. This issue was found by manual code inspection. Fixes: 33fc42de3327 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li --- 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 be3bd025c41a..04d0a1eec4cf 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -5394,6 +5394,7 @@ static void mtk_remove(struct platform_device *pdev) netif_napi_del(ð->tx_napi); netif_napi_del(ð->rx_napi); + mtk_ppe_deinit(eth); mtk_cleanup(eth); free_netdev(eth->dummy_dev); mtk_mdio_cleanup(eth); -- 2.43.0