summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-03 08:44:31 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-07-29 23:30:46 +0200
commitea583cb09051aef3a1b2a770caa7e564e7042483 (patch)
tree0b8386d3f5d4bb913004c0b0287e402036dfa5d9
parent305d0a1ab668ee560de7fe5eed0b62cf419a50f9 (diff)
downloadlwn-ea583cb09051aef3a1b2a770caa7e564e7042483.tar.gz
lwn-ea583cb09051aef3a1b2a770caa7e564e7042483.zip
hrtimer: fix reprogram thinko
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--kernel/hrtimer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index aecb304768ed..3e38b139b6b5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -664,6 +664,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
/*
@@ -673,6 +676,12 @@ static inline int hrtimer_enqueue_reprogram(struct hrtimer *timer,
*/
if (!hrtimer_rt_defer(timer)) {
__run_hrtimer(timer);
+ /*
+ * __run_hrtimer might have requeued timer and
+ * it could be base->first again.
+ */
+ if (base->first == &timer->node)
+ goto again;
return 1;
}
#endif