From 643b60ffb0734f47a0a80e508a098b3e9d398a4d Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 18 Jul 2011 23:32:21 +0000 Subject: [PATCH] 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 Acked-by: Russ Meyerriecks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10047 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wcte12xp/base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 68fcd96..056b98b 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2686,6 +2686,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);