diff options
author | Anish Bhatt <anish@chelsio.com> | 2014-08-21 00:44:06 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-22 08:45:36 +0400 |
commit | 29aaee65bc28cc75281dc9fe0998cc5e10ac37f9 (patch) | |
tree | 7cfffd8e08c218490a8ac8ba48ee68a6906e44eb /drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | |
parent | 061079ac0b9be7a578dcd09f7865c2c0d6ac894a (diff) | |
download | linux-29aaee65bc28cc75281dc9fe0998cc5e10ac37f9.tar.xz |
cxgb4: Fix race condition in cleanup
There is a possible race condition when we unregister the PCI Driver and then
flush/destroy the global "workq". This could lead to situations where there
are tasks on the Work Queue with references to now deleted adapter data
structures. Instead, have per-adapter Work Queues which were instantiated and
torn down in init_one() and remove_one(), respectively.
v2: Remove unnecessary call to flush_workqueue() before destroy_workqueue()
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4.h')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h index d57282172ea5..c067b7888ac4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h @@ -652,6 +652,7 @@ struct adapter { struct tid_info tids; void **tid_release_head; spinlock_t tid_release_lock; + struct workqueue_struct *workq; struct work_struct tid_release_task; struct work_struct db_full_task; struct work_struct db_drop_task; |