Patchwork [v2,4/4] netback: correct netbk_tx_err to handle wrap around.

login
register
mail settings
Submitter Ian Campbell
Date Feb. 7, 2013, 9:41 a.m.
Message ID <1360230098-28218-4-git-send-email-ian.campbell@citrix.com>
Download mbox | patch
Permalink /patch/218869/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ian Campbell - Feb. 7, 2013, 9:41 a.m.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Cc: <stable@vger.kernel.org> # 3.0+
---
 drivers/net/xen-netback/netback.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index dcb2d4d..2b9520c 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -880,7 +880,7 @@  static void netbk_tx_err(struct xenvif *vif,
 
 	do {
 		make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
-		if (cons >= end)
+		if (cons == end)
 			break;
 		txp = RING_GET_REQUEST(&vif->tx, cons++);
 	} while (1);