]> git.hungrycats.org Git - linux/commitdiff
Mark timer as running in the timer base _before_ we clear the pending
authorLinus Torvalds <torvalds@home.osdl.org>
Mon, 13 Oct 2003 14:50:54 +0000 (07:50 -0700)
committerDavid S. Miller <davem@kernel.bkbits.net>
Mon, 13 Oct 2003 14:50:54 +0000 (07:50 -0700)
flag (and order it on SMP), so that del_timer_sync() always sees the
timer either pending or running if it is active.

kernel/timer.c

index 176d2c3215b4e8261dc03bc44449ba898047088d..1c513bd0b1e0e2d4b29deea4a66fd3b18f356d44 100644 (file)
@@ -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);