Skip to content

Commit

Permalink
rangetimer: fix BUG_ON reported by Ingo
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arjan van de Ven committed Oct 11, 2008
1 parent 2075eb8 commit 030aebd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,11 +1395,15 @@ void hrtimer_peek_ahead_timers(void)
unsigned long flags;
struct tick_device *td;
struct clock_event_device *dev;

struct hrtimer_cpu_base *cpu_base;
if (hrtimer_hres_active())
return;

local_irq_save(flags);
cpu_base = &__get_cpu_var(hrtimer_bases);
if (!cpu_base->hres_active)
goto out;

td = &__get_cpu_var(tick_cpu_device);
if (!td)
goto out;
Expand Down

0 comments on commit 030aebd

Please sign in to comment.