diff options
author | Arjun Vynipadath <arjun@chelsio.com> | 2018-11-09 10:20:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-10 00:18:00 +0100 |
commit | 2a8d84bf513823ba398f4b2dec41b8decf4041af (patch) | |
tree | 7558bb63b1b74cd1b7cc7563db9dd650042c49d6 /drivers | |
parent | net: tcp: remove BUG_ON from tcp_v4_err (diff) | |
download | linux-2a8d84bf513823ba398f4b2dec41b8decf4041af.tar.xz linux-2a8d84bf513823ba398f4b2dec41b8decf4041af.zip |
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 <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 05a46926016a..956e708c777d 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; } |