Skip to content

Commit 2731aa7

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
timers: Initialize base::next_expiry_recalc in timers_prepare_cpu()
When base::next_expiry_recalc is not initialized to false during cpu bringup in HOTPLUG_CPU and is accidently true and no timer is queued in the meantime, the loop through the wheel to find __next_timer_interrupt() might be done for nothing. Therefore initialize base::next_expiry_recalc to false in timers_prepare_cpu(). Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c54bc0f commit 2731aa7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/time/timer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ int timers_prepare_cpu(unsigned int cpu)
19531953
base = per_cpu_ptr(&timer_bases[b], cpu);
19541954
base->clk = jiffies;
19551955
base->next_expiry = base->clk + NEXT_TIMER_MAX_DELTA;
1956+
base->next_expiry_recalc = false;
19561957
base->timers_pending = false;
19571958
base->is_idle = false;
19581959
}

0 commit comments

Comments
 (0)