diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 6a7938a0d513c2695563a2801eaf6941d1b65128..067ba2c0532805f8e9e3e753eba456d6a7cbf1b9 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -814,7 +814,12 @@ hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) timer_stats_hrtimer_set_start_info(timer); - enqueue_hrtimer(timer, new_base, base == new_base); + /* + * Only allow reprogramming if the new base is on this CPU. + * (it might still be on another CPU if the timer was pending) + */ + enqueue_hrtimer(timer, new_base, + new_base->cpu_base == &__get_cpu_var(hrtimer_bases)); unlock_hrtimer_base(timer, &flags);