History

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.

Arjan van de Ven committed 18 years ago

Commit 030aebd1 parent 2075eb81 file · +5 −1Browse files

Unified · Split

kernel/hrtimer.c+5−1
@@ -1395,11 +1395,15 @@ void hrtimer_peek_ahead_timers(void) · 1394 unmodified lines
13951395 unsigned long flags;
13961396 struct tick_device *td;
13971397 struct clock_event_device *dev;
1398−
1398+ struct hrtimer_cpu_base *cpu_base;
13991399 if (hrtimer_hres_active())
14001400 return;
14011401
14021402 local_irq_save(flags);
1403+ cpu_base = &__get_cpu_var(hrtimer_bases);
1404+ if (!cpu_base->hres_active)
1405+ goto out;
1406+
14031407 td = &__get_cpu_var(tick_cpu_device);
14041408 if (!td)
14051409 goto out;