aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-11 15:25:45 -0400
committerArjan van de Ven <arjan@linux.intel.com>2008-10-11 15:25:45 -0400
commit030aebd2e439a2ebcca2b0ce30a02ed84feb043e (patch)
tree2a6e0ce9fbd690dd8d8be1b615dcedeaefffcc23 /kernel/hrtimer.c
parent2075eb8d95612cadde91ef5be82691d97a2ea6c5 (diff)
rangetimer: fix BUG_ON reported by Ingo
There's a small race/chance that, while hrtimers are enabled globally, they're later not enabled when we're calling the hrtimer_interrupt() function, which then BUG_ON()'s for that. This patch closes that race/gap. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index eb2cf984959..b17657d8d81 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1395,11 +1395,15 @@ void hrtimer_peek_ahead_timers(void)
1395 unsigned long flags; 1395 unsigned long flags;
1396 struct tick_device *td; 1396 struct tick_device *td;
1397 struct clock_event_device *dev; 1397 struct clock_event_device *dev;
1398 1398 struct hrtimer_cpu_base *cpu_base;
1399 if (hrtimer_hres_active()) 1399 if (hrtimer_hres_active())
1400 return; 1400 return;
1401 1401
1402 local_irq_save(flags); 1402 local_irq_save(flags);
1403 cpu_base = &__get_cpu_var(hrtimer_bases);
1404 if (!cpu_base->hres_active)
1405 goto out;
1406
1403 td = &__get_cpu_var(tick_cpu_device); 1407 td = &__get_cpu_var(tick_cpu_device);
1404 if (!td) 1408 if (!td)
1405 goto out; 1409 goto out;