From 9b1ea793169138888f43c40047f886139e3e7ad4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 25 Jan 2009 11:31:36 +0100 Subject: [PATCH] --- yaml --- r: 135735 b: refs/heads/master c: 6626bff24578753808c8b5bd4f1619e14e980f0f h: refs/heads/master i: 135733: 63a17f909f98e684c29206edee5b4fe8039f4122 135731: aca6123519c423222540123173a7a332839abb29 135727: 96fa374853023b07aa4a35d2a236ef35225cd0f1 v: v3 --- [refs] | 2 +- trunk/kernel/hrtimer.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 20ef2eed9f5b..8f7473122e2f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5b74f9e0e005baf12a2df6aaeef7d7134137792b +refs/heads/master: 6626bff24578753808c8b5bd4f1619e14e980f0f diff --git a/trunk/kernel/hrtimer.c b/trunk/kernel/hrtimer.c index 2c40ee8f44bd..d71cef25954b 100644 --- a/trunk/kernel/hrtimer.c +++ b/trunk/kernel/hrtimer.c @@ -501,6 +501,13 @@ static void hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base) continue; timer = rb_entry(base->first, struct hrtimer, node); expires = ktime_sub(hrtimer_get_expires(timer), base->offset); + /* + * clock_was_set() has changed base->offset so the + * result might be negative. Fix it up to prevent a + * false positive in clockevents_program_event() + */ + if (expires.tv64 < 0) + expires.tv64 = 0; if (expires.tv64 < cpu_base->expires_next.tv64) cpu_base->expires_next = expires; }