* [PATCH net-next] cxgb4: free mac_hlist properly
@ 2018-11-09 9:20 Arjun Vynipadath
2018-11-09 23:19 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Arjun Vynipadath @ 2018-11-09 9:20 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/cxgb4/cxgb4_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 05a4692..956e708 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2295,6 +2295,8 @@ static int cxgb_up(struct adapter *adap)
static void cxgb_down(struct adapter *adapter)
{
+ struct hash_mac_addr *entry, *tmp;
+
cancel_work_sync(&adapter->tid_release_task);
cancel_work_sync(&adapter->db_full_task);
cancel_work_sync(&adapter->db_drop_task);
@@ -2303,6 +2305,12 @@ static void cxgb_down(struct adapter *adapter)
t4_sge_stop(adapter);
t4_free_sge_resources(adapter);
+
+ list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist, list) {
+ list_del(&entry->list);
+ kfree(entry);
+ }
+
adapter->flags &= ~FULL_INIT_DONE;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] cxgb4: free mac_hlist properly
2018-11-09 9:20 [PATCH net-next] cxgb4: 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:50:25 +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:20 [PATCH net-next] cxgb4: 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).