summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-10-13 07:50:54 -0700
committerDavid S. Miller <davem@kernel.bkbits.net>2003-10-13 07:50:54 -0700
commit5b84ad196f0d40a604c95cb74ccffcd6721d0fb2 (patch)
treef961bcecb60dae2b924229ebdf4add2af1b693c9 /kernel
parent511f1ac6f35faccfa496885e6aa138ff2e56124a (diff)
Mark timer as running in the timer base _before_ we clear the pending
flag (and order it on SMP), so that del_timer_sync() always sees the timer either pending or running if it is active.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 176d2c3215b4..1c513bd0b1e0 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -418,8 +418,9 @@ repeat:
data = timer->data;
list_del(&timer->entry);
- timer->base = NULL;
set_running_timer(base, timer);
+ smp_wmb();
+ timer->base = NULL;
spin_unlock_irq(&base->lock);
fn(data);
spin_lock_irq(&base->lock);