summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2011-07-19 19:45:01 +0000
committerShaun Ruffell <sruffell@digium.com>2011-07-19 19:45:01 +0000
commita93faaef686be31ac3906a8deae426b5ec927c28 (patch)
tree01b6d951d93d3f155e7dfafc0dc694ac477a1d9c
parent6368821328756ed49035ce1243835374b5a4cb2a (diff)
wcte12xp: Close a potential race on driver unload.
The shutdown logic requires that all CPUs see that the INITIALIZED bit has been cleared. Otherwise it may be possible for the workqueue to run after the hardware resources have been released. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10047 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@10049 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wcte12xp/base.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 5f720a1..784e475 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -2381,6 +2381,7 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
remove_sysfs_files(wc);
clear_bit(INITIALIZED, &wc->bit_flags);
+ smp_mb__after_clear_bit();
del_timer_sync(&wc->timer);
flush_workqueue(wc->wq);