From: Anish Bhatt Date: Wed, 20 Aug 2014 20:44:06 +0000 (-0700) Subject: cxgb4: Fix race condition in cleanup X-Git-Tag: omap-for-v3.17/fixes-against-rc2~24^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29aaee65bc28cc75281dc9fe0998cc5e10ac37f9;p=pandora-kernel.git 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 Signed-off-by: Casey Leedom Acked-by: Neil Horman Signed-off-by: David S. Miller --- Reading git-diff-tree failed