Commit 810ed91e authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by Greg Kroah-Hartman

cxgb4: free mac_hlist properly

[ Upstream commit 2a8d84bf ]

The locally maintained list for tracking hash mac table was
not freed during driver remove.
Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 36235239
......@@ -2296,6 +2296,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);
......@@ -2304,6 +2306,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment