From fb9c01fe7975da9c67ad3875a5e89c002d7cb897 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 8 Jul 2010 09:52:34 +0100 Subject: [PATCH] xen: use s_time_t for periodic timer deadlines. Otherwise vcpu_periodic_timer_work() can think the next timer is in the future (and re-issue it unchanged) while timer_softirq_action() thinks it's in the past (and fires it immediately), leading to livelock. Signed-off-by: Tim Deegan --- xen/common/schedule.c | 2 +- xen/include/xen/sched.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 3ad2167fdf..40648c37bb 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -992,7 +992,7 @@ long sched_adjust_global(struct xen_sysctl_scheduler_op *op) static void vcpu_periodic_timer_work(struct vcpu *v) { s_time_t now = NOW(); - uint64_t periodic_next_event; + s_time_t periodic_next_event; if ( v->periodic_period == 0 ) return; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index e78a0948b7..0d21cee9f9 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -89,8 +89,8 @@ struct vcpu struct vcpu *next_in_list; - uint64_t periodic_period; - uint64_t periodic_last_event; + s_time_t periodic_period; + s_time_t periodic_last_event; struct timer periodic_timer; struct timer singleshot_timer; -- 2.30.2