From: Frederic Weisbecker Date: Thu, 11 May 2017 14:36:19 +0000 (+0200) Subject: nohz: Add hrtimer sanity check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce6cf9a15d62fd7ee92f4f9bb754883bacf85a3e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git nohz: Add hrtimer sanity check Signed-off-by: Frederic Weisbecker Signed-off-by: Ingo Molnar --- diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 64c97fc130c4..d212bb62bc08 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -771,8 +771,13 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, tick = expires; /* Skip reprogram of event if its not changed */ - if (ts->tick_stopped && (expires == dev->next_event)) - goto out; + if (ts->tick_stopped) { + if (hrtimer_active(&ts->sched_timer)) + WARN_ON_ONCE(hrtimer_get_expires(&ts->sched_timer) < dev->next_event); + + if (expires == dev->next_event) + goto out; + } /* * nohz_stop_sched_tick can be called several times before