[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.3-testing] xenconsoled: Fix rate-limit calculation overflow leading to console
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1245753405 -3600 # Node ID d0e390faafe8c7f9691b467bbe5f32d758760a12 # Parent 7566f03788bc94364771660b29a2aa4476a46f43 xenconsoled: Fix rate-limit calculation overflow leading to console freezes. From: Eric Tessler <eric@xxxxxxxxx> Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> xen-unstable changeset: 19814:20c0df018786 xen-unstable date: Tue Jun 23 11:25:38 2009 +0100 --- tools/console/daemon/io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -r 7566f03788bc -r d0e390faafe8 tools/console/daemon/io.c --- a/tools/console/daemon/io.c Thu Jun 18 13:02:09 2009 +0100 +++ b/tools/console/daemon/io.c Tue Jun 23 11:36:45 2009 +0100 @@ -684,7 +684,7 @@ static struct domain *create_domain(int dom->buffer.capacity = 0; dom->buffer.max_capacity = 0; dom->event_count = 0; - dom->next_period = (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000) + RATE_LIMIT_PERIOD; + dom->next_period = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000) + RATE_LIMIT_PERIOD; dom->next = NULL; dom->ring_ref = -1; @@ -1005,7 +1005,7 @@ void handle_io(void) if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) return; - now = (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); + now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); /* Re-calculate any event counter allowances & unblock domains with new allowance */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |