Commit 49d670fb8dd62d3ed4e3ed2513538ea65b051aed

Authored by Thomas Gleixner
1 parent 4faac97d44

clockevents: prevent stale tick_next_period for onlining CPUs

Impact: possible hang on CPU onlining in timer one shot mode.

The tick_next_period variable is only used during boot on nohz/highres
enabled systems, but for CPU onlining it needs to be maintained when
the per cpu clock events device operates in one shot mode.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

kernel/time/tick-sched.c
... ... @@ -75,6 +75,9 @@
75 75 incr * ticks);
76 76 }
77 77 do_timer(++ticks);
  78 +
  79 + /* Keep the tick_next_period variable up to date */
  80 + tick_next_period = ktime_add(last_jiffies_update, tick_period);
78 81 }
79 82 write_sequnlock(&xtime_lock);
80 83 }