mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
cxgb4: free mac_hlist properly
[ Upstream commit 2a8d84bf51 ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
da9de008fb
commit
138545f91b
@@ -2251,6 +2251,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);
|
||||
@@ -2259,6 +2261,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user