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-devel

[Xen-devel] [PATCH] netfront: fix updating of req_prod_pvt in the receiv

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] netfront: fix updating of req_prod_pvt in the receive ring for the flipping case
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 04 Jun 2008 08:35:39 +0100
Cc: Pat Campbell <PLC@xxxxxxxxxx>
Delivery-date: Wed, 04 Jun 2008 00:35:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Pat Campbell <plc@xxxxxxxxxx>

While obsolete, it still shouldn't be left broken.

(Adjusted to not use an extra variable.)

As usual, written on 2.6.25.4 and made apply to the 2.6.18 tree without
further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2008-05-19/drivers/xen/netfront/netfront.c
===================================================================
--- head-2008-05-19.orig/drivers/xen/netfront/netfront.c        2008-06-04 
09:12:13.000000000 +0200
+++ head-2008-05-19/drivers/xen/netfront/netfront.c     2008-06-04 
09:20:50.000000000 +0200
@@ -852,8 +852,8 @@ no_skb:
                        /* Check return status of HYPERVISOR_memory_op(). */
                        if (unlikely(np->rx_mcl[i].result != i))
                                panic("Unable to reduce memory reservation\n");
-                       while (i--)
-                               BUG_ON(np->rx_mcl[i].result);
+                       while (nr_flips--)
+                               BUG_ON(np->rx_mcl[nr_flips].result);
                } else {
                        if (HYPERVISOR_memory_op(XENMEM_decrease_reservation,
                                                 &reservation) != i)




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] netfront: fix updating of req_prod_pvt in the receive ring for the flipping case, Jan Beulich <=