浏览代码

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>
John Stultz 14 年之前
父节点
当前提交
b007c389d3
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      kernel/hrtimer.c

+ 2 - 5
kernel/hrtimer.c

@@ -1412,11 +1412,8 @@ void hrtimer_run_queues(void)
 		return;
 		return;
 
 
 	for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {
 	for (index = 0; index < HRTIMER_MAX_CLOCK_BASES; index++) {
-		struct timerqueue_node *next;
-
 		base = &cpu_base->clock_base[index];
 		base = &cpu_base->clock_base[index];
-		next = timerqueue_getnext(&base->active);
-		if (!next)
+		if (!timerqueue_getnext(&base->active))
 			continue;
 			continue;
 
 
 		if (gettime) {
 		if (gettime) {
@@ -1426,7 +1423,7 @@ void hrtimer_run_queues(void)
 
 
 		raw_spin_lock(&cpu_base->lock);
 		raw_spin_lock(&cpu_base->lock);
 
 
-		while ((node = next)) {
+		while ((node = timerqueue_getnext(&base->active))) {
 			struct hrtimer *timer;
 			struct hrtimer *timer;
 
 
 			timer = container_of(node, struct hrtimer, node);
 			timer = container_of(node, struct hrtimer, node);