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.4-testing] xenconsoled: Fix rate-limit calculatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] xenconsoled: Fix rate-limit calculation overflow leading to console
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 23 Jun 2009 03:45:45 -0700
Delivery-date: Tue, 23 Jun 2009 03:47:41 -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 1245753254 -3600
# Node ID 0d2a9eea94acff4401a4b2c6fd8cd4d619616379
# Parent  e273d01fd5eb832b681b51a0f4f959038487ae24
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 e273d01fd5eb -r 0d2a9eea94ac tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Tue Jun 23 11:33:46 2009 +0100
+++ b/tools/console/daemon/io.c Tue Jun 23 11:34:14 2009 +0100
@@ -688,7 +688,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;
@@ -1009,7 +1009,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.4-testing] xenconsoled: Fix rate-limit calculation overflow leading to console, Xen patchbot-3.4-testing <=