From 4df49c8c5996bb626c759e04c6a99e09cdf87583 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:31 -0500 Subject: [PATCH] hrtimer: fix reprogram thinko commit ea583cb09051aef3a1b2a770caa7e564e7042483 in tip. Signed-off-by: Thomas Gleixner Signed-off-by: Paul Gortmaker --- kernel/hrtimer.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index f22611d..05302de 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -701,6 +701,9 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer, struct hrtimer_clock_base *base, int wakeup) { +#ifdef CONFIG_PREEMPT_RT +again: +#endif if (base->cpu_base->hres_active && hrtimer_reprogram(timer, base)) { #ifdef CONFIG_PREEMPT_RT /* @@ -712,6 +715,12 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer, ktime_t now = ktime_get(); __run_hrtimer(timer, &now); + /* + * __run_hrtimer might have requeued timer and + * it could be base->first again. + */ + if (base->first == &timer->node) + goto again; return 1; } #endif -- 1.7.0.4