Skip to content

Commit b007c38

Browse files
hrtimer: fix timerqueue conversion flub
In converting the hrtimers to timerqueue, I missed a spot in hrtimer_run_queues where we loop running timers. We end up not pulling the new next value out and instead just use the last next value, causing boot time hangs in some cases. The proper fix is to pull timerqueue_getnext each iteration instead of using a local next value. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: John Stultz <john.stultz@linaro.org>
1 parent 998adc3 commit b007c38

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎kernel/hrtimer.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,11 +1412,8 @@ void hrtimer_run_queues(void)
14121412
return;
14131413

14141414
for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {
1415-
struct timerqueue_node *next;
1416-
14171415
base = &cpu_base->clock_base[index];
1418-
next = timerqueue_getnext(&base->active);
1419-
if (!next)
1416+
if (!timerqueue_getnext(&base->active))
14201417
continue;
14211418

14221419
if (gettime) {
@@ -1426,7 +1423,7 @@ void hrtimer_run_queues(void)
14261423

14271424
raw_spin_lock(&cpu_base->lock);
14281425

1429-
while ((node = next)) {
1426+
while ((node = timerqueue_getnext(&base->active))) {
14301427
struct hrtimer *timer;
14311428

14321429
timer = container_of(node, struct hrtimer, node);

0 commit comments

Comments
 (0)