WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.3-testing] xenconsoled: Fix rate-limit calculatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.3-testing] xenconsoled: Fix rate-limit calculation overflow leading to console
From: "Xen patchbot-3.3-testing" <patchbot-3.3-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Jun 2009 03:45:30 -0700
Delivery-date: Tue, 23 Jun 2009 03:46:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.3-testing] xenconsoled: Fix rate-limit calculation overflow leading to console, Xen patchbot-3.3-testing <=