Skip to content

Commit

Permalink
octeontx2-pf: Fix memory leak during interface down
Browse files Browse the repository at this point in the history
[ Upstream commit 5f228d7 ]

During 'ifconfig <netdev> down' one RSS memory was not getting freed.
This patch fixes the same.

Fixes: 81a4362 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Suman Ghosh authored and gregkh committed Dec 3, 2023
1 parent 4206f46 commit cfbdb36
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,6 +1919,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,
Expand Down

0 comments on commit cfbdb36

Please sign in to comment.