Commit b007c389d3e09b823eccda1503390fa2a9adca0d

Authored by John Stultz
1 parent 998adc3dda

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>

Showing 1 changed file with 2 additions and 5 deletions Side-by-side Diff

... ... @@ -1412,11 +1412,8 @@
1412 1412 return;
1413 1413  
1414 1414 for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {
1415   - struct timerqueue_node *next;
1416   -
1417 1415 base = &cpu_base->clock_base[index];
1418   - next = timerqueue_getnext(&base->active);
1419   - if (!next)
  1416 + if (!timerqueue_getnext(&base->active))
1420 1417 continue;
1421 1418  
1422 1419 if (gettime) {
... ... @@ -1426,7 +1423,7 @@
1426 1423  
1427 1424 raw_spin_lock(&cpu_base->lock);
1428 1425  
1429   - while ((node = next)) {
  1426 + while ((node = timerqueue_getnext(&base->active))) {
1430 1427 struct hrtimer *timer;
1431 1428  
1432 1429 timer = container_of(node, struct hrtimer, node);