summaryrefslogtreecommitdiff
path: root/kernel/time/tick-sched.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2017-05-11 16:36:19 +0200
committerIngo Molnar <mingo@kernel.org>2017-05-17 08:19:26 +0200
commitce6cf9a15d62fd7ee92f4f9bb754883bacf85a3e (patch)
tree215a81c09298ed726f3cf10db4ec4116d91e94a0 /kernel/time/tick-sched.c
parentb23afd384801711ab6dbccd259cc14cb09a1dcaf (diff)
nohz: Add hrtimer sanity check
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r--kernel/time/tick-sched.c9
1 files changed, 7 insertions, 2 deletions
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