cxgb4: free mac_hlist properly
Subsystems (3)
PATCH 1/1 cxgb4: free mac_hlist properly
The locally maintained list for tracking hash mac table was not freed during driver remove.
Signed-off-by Arjun Vynipadath <[email protected]>
Signed-off-by Ganesh Goudar <[email protected]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +8 -0
@@ -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 ; }
Signature · 1 line
1.8.3.1
From: Arjun Vynipadath <[email protected]>
Date: Fri, 9 Nov 2018 14:50:25 +0530
Quoted 5 lines
The locally maintained list for tracking hash mac table was not freed during driver remove.
Signed-off-by Arjun Vynipadath <[email protected]>Signed-off-by Ganesh Goudar <[email protected]>
Applied.