Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ad28d94abb1313bdf27e196676292c493f92f824
Commit:     ad28d94abb1313bdf27e196676292c493f92f824
Parent:     c6ca97d26a7efe9488174336bc67fdaea01aad49
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Fri Mar 16 13:38:21 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Mar 16 19:25:05 2007 -0700

    [PATCH] hrtimer: fix up unlocked access to wall_to_monotonic
    
    commit f4304ab21513b834c8fe3403927c60c2b81a72d7 (HZ free NTP) moved the
    access to wall_to_monotonic in hrtimer_get_softirq_time() out of the
    xtime_lock protection.
    
    Move it back into the seq_lock section.
    
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Acked-by: John Stultz <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/hrtimer.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 5e7122d..6a7938a 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(ktime_get_ts);
 static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
 {
        ktime_t xtim, tomono;
-       struct timespec xts;
+       struct timespec xts, tom;
        unsigned long seq;
 
        do {
@@ -145,10 +145,11 @@ static void hrtimer_get_softirq_time(struct 
hrtimer_cpu_base *base)
 #else
                xts = xtime;
 #endif
+               tom = wall_to_monotonic;
        } while (read_seqretry(&xtime_lock, seq));
 
        xtim = timespec_to_ktime(xts);
-       tomono = timespec_to_ktime(wall_to_monotonic);
+       tomono = timespec_to_ktime(tom);
        base->clock_base[CLOCK_REALTIME].softirq_time = xtim;
        base->clock_base[CLOCK_MONOTONIC].softirq_time =
                ktime_add(xtim, tomono);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to