* [PATCH net-next] cxgb4vf: free mac_hlist properly
@ 2018-11-09 9:22 Arjun Vynipadath
2018-11-09 23:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arjun Vynipadath @ 2018-11-09 9:22 UTC (permalink / raw)
To: netdev, davem; +Cc: nirranjan, indranil, dt, Arjun Vynipadath, Ganesh Goudar
The locally maintained list for tracking hash mac table was
not freed during driver remove.
Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
---
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 972dc7b..8ec503c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -3289,6 +3289,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
static void cxgb4vf_pci_remove(struct pci_dev *pdev)
{
struct adapter *adapter = pci_get_drvdata(pdev);
+ struct hash_mac_addr *entry, *tmp;
/*
* Tear down driver state associated with device.
@@ -3339,6 +3340,11 @@ static void cxgb4vf_pci_remove(struct pci_dev *pdev)
if (!is_t4(adapter->params.chip))
iounmap(adapter->bar2);
kfree(adapter->mbox_log);
+ list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist,
+ list) {
+ list_del(&entry->list);
+ kfree(entry);
+ }
kfree(adapter);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] cxgb4vf: free mac_hlist properly
2018-11-09 9:22 [PATCH net-next] cxgb4vf: free mac_hlist properly Arjun Vynipadath
@ 2018-11-09 23:19 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-09 23:19 UTC (permalink / raw)
To: arjun; +Cc: netdev, nirranjan, indranil, dt, ganeshgr
From: Arjun Vynipadath <arjun@chelsio.com>
Date: Fri, 9 Nov 2018 14:52:53 +0530
> The locally maintained list for tracking hash mac table was
> not freed during driver remove.
>
> Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-10 9:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 9:22 [PATCH net-next] cxgb4vf: free mac_hlist properly Arjun Vynipadath
2018-11-09 23:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).