netback: correct netbk_tx_err to handle wrap around.
authorIan Campbell <Ian.Campbell@citrix.com>
Wed, 6 Feb 2013 23:41:38 +0000 (23:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Feb 2013 04:29:29 +0000 (23:29 -0500)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netback/netback.c

index dcb2d4d..2b9520c 100644 (file)
@@ -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);