From: Keir Fraser Date: Thu, 8 Jul 2010 08:52:34 +0000 (+0100) Subject: xen: use s_time_t for periodic timer deadlines. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11828 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fb9c01fe7975da9c67ad3875a5e89c002d7cb897;p=xen.git 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 --- 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;