[PATCH 4/5] 2.6.6-bk8 pcnet32 fix boundary comparison bug.
From: Don Fry <hidden>
Date: 2004-05-21 20:31:02
From: Don Fry <hidden>
Date: 2004-05-21 20:31:02
This patch fixes a boundary condition. It is possible to get an interrupt and have the transmit queue completely full. Without this the driver will leak skb's and pci maps (if the arch supports them).
--- linux-2.6.6-bk8/drivers/net/pro.pcnet32.c Fri May 21 09:59:18 2004
+++ linux-2.6.6-bk8/drivers/net/pcnet32.c Fri May 21 10:00:10 2004@@ -1833,7 +1833,7 @@ } delta = (lp->cur_tx - dirty_tx) & (TX_RING_MOD_MASK + TX_RING_SIZE); - if (delta >= TX_RING_SIZE) { + if (delta > TX_RING_SIZE) { if (netif_msg_drv(lp)) printk(KERN_ERR "%s: out-of-sync dirty pointer, %d vs. %d, full=%d.\n", dev->name, dirty_tx, lp->cur_tx, lp->tx_full);
--
Don Fry
brazilnut@us.ibm.com