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-unstable] [NET] back: Fix bug in 12262:ac2097d71e06

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [NET] back: Fix bug in 12262:ac2097d71e06dbbf77279af10d6ae7359d921ab0.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Nov 2006 12:10:30 +0000
Delivery-date: Thu, 16 Nov 2006 04:10:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ba84d697b1eafe46f357f9498a8e7c823f44c69d
# Parent  b276ed52616aa89b12e6cbb2f8c3e21cddfefb97
[NET] back: Fix bug in 12262:ac2097d71e06dbbf77279af10d6ae7359d921ab0.
Pointed out by Jan Beulich.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r b276ed52616a -r ba84d697b1ea 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Thu Nov 16 
07:48:37 2006 +0000
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Thu Nov 16 
08:56:58 2006 +0000
@@ -825,7 +825,9 @@ static void tx_add_credit(netif_t *netif
        max_burst = max(max_burst, netif->credit_bytes);
 
        /* Take care that adding a new chunk of credit doesn't wrap to zero. */
-       max_credit = max(netif->remaining_credit + netif->credit_bytes, ~0UL);
+       max_credit = netif->remaining_credit + netif->credit_bytes;
+       if (max_credit < netif->remaining_credit)
+               max_credit = ULONG_MAX; /* wrapped: clamp to ULONG_MAX */
 
        netif->remaining_credit = min(max_credit, max_burst);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [NET] back: Fix bug in 12262:ac2097d71e06dbbf77279af10d6ae7359d921ab0., Xen patchbot-unstable <=