Commit e932fecf authored by Don Fry's avatar Don Fry Committed by Jeff Garzik

[PATCH] pcnet32: fix boundary comparison bug.

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).
parent 1ac65768
......@@ -1833,7 +1833,7 @@ pcnet32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
}
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment