Skip to content
Commit 29aaee65 authored by Anish Bhatt's avatar Anish Bhatt Committed by David S. Miller
Browse files

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: default avatarAnish Bhatt <anish@chelsio.com>
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 061079ac
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