[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] netfront: fix updating of req_prod_pvt in the receive ring for the flipping case

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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.