diff options
author | Suman Ghosh <sumang@marvell.com> | 2023-11-17 13:40:18 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-11-19 23:07:48 +0300 |
commit | 5f228d7c8a539714c1e9b7e7534f76bb7979f268 (patch) | |
tree | fae7199e385b54c9a82b7685ab8b0f5ff1ff7275 | |
parent | 93da8d75a66568ba4bb5b14ad2833acd7304cd02 (diff) | |
download | linux-5f228d7c8a539714c1e9b7e7534f76bb7979f268.tar.xz |
octeontx2-pf: Fix memory leak during interface down
During 'ifconfig <netdev> down' one RSS memory was not getting freed.
This patch fixes the same.
Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index 91b99fd70361..ba95ac913274 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -1934,6 +1934,8 @@ int otx2_stop(struct net_device *netdev) /* Clear RSS enable flag */ rss = &pf->hw.rss_info; rss->enable = false; + if (!netif_is_rxfh_configured(netdev)) + kfree(rss->rss_ctx[DEFAULT_RSS_CONTEXT_GROUP]); /* Cleanup Queue IRQ */ vec = pci_irq_vector(pf->pdev, |