瀏覽代碼

netback: correct netbk_tx_err to handle wrap around.

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>
Ian Campbell 12 年之前
父節點
當前提交
b9149729eb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/xen-netback/netback.c

+ 1 - 1
drivers/net/xen-netback/netback.c

@@ -880,7 +880,7 @@ static void netbk_tx_err(struct xenvif *vif,
 
 
 	do {
 	do {
 		make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
 		make_tx_response(vif, txp, XEN_NETIF_RSP_ERROR);
-		if (cons >= end)
+		if (cons == end)
 			break;
 			break;
 		txp = RING_GET_REQUEST(&vif->tx, cons++);
 		txp = RING_GET_REQUEST(&vif->tx, cons++);
 	} while (1);
 	} while (1);