From: Ian Campbell Date: Wed, 6 Feb 2013 23:41:38 +0000 (+0000) Subject: netback: correct netbk_tx_err to handle wrap around. X-Git-Tag: firefly_0821_release~7541^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7406f4230c4d086793cc62fa657750abf98559d6;p=firefly-linux-kernel-4.4.55.git netback: correct netbk_tx_err to handle wrap around. [ Upstream commit b9149729ebdcfce63f853aa54a404c6a8f6ebbf3 ] Signed-off-by: Ian Campbell Acked-by: Jan Beulich Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 40e8a33c28cd..9068d32d2d5c 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -839,7 +839,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);