# fix for CAN-2003-0001 fix (1.1063.1.51, from 2.4.23-pre3) --- linux-2.4.22/drivers/net/3c527.c 2003-06-13 14:51:34.000000000 +0000 +++ linux-2.4.23-pre3/drivers/net/3c527.c 2003-09-03 20:36:51.000000000 +0000 @@ -1083,15 +1083,16 @@ /* NP is the buffer we will be loading */ np=lp->tx_ring[lp->tx_ring_head].p; - /* We will need this to flush the buffer out */ - lp->tx_ring[lp->tx_ring_head].skb=skb; - if(skb->len < ETH_ZLEN) { skb = skb_padto(skb, ETH_ZLEN); if(skb == NULL) goto out; } + + /* We will need this to flush the buffer out */ + lp->tx_ring[lp->tx_ring_head].skb=skb; + np->length = (skb->len < ETH_ZLEN) ? ETH_ZLEN : skb->len; np->data = virt_to_bus(skb->data); --- linux-2.4.22/drivers/net/eth16i.c 2003-06-13 14:51:34.000000000 +0000 +++ linux-2.4.23-pre3/drivers/net/eth16i.c 2003-09-03 20:35:21.000000000 +0000 @@ -1057,7 +1057,7 @@ int ioaddr = dev->base_addr; int status = 0; ushort length = skb->len; - unsigned char *buf = skb->data; + unsigned char *buf; unsigned long flags; if(length < ETH_ZLEN) @@ -1067,6 +1067,7 @@ return 0; length = ETH_ZLEN; } + buf = skb->data; netif_stop_queue(dev); --- linux-2.4.22/drivers/net/seeq8005.c 2003-06-13 14:51:35.000000000 +0000 +++ linux-2.4.23-pre3/drivers/net/seeq8005.c 2003-09-03 20:37:36.000000000 +0000 @@ -379,7 +379,7 @@ { struct net_local *lp = (struct net_local *)dev->priv; short length = skb->len; - unsigned char *buf = skb->data; + unsigned char *buf; if(length < ETH_ZLEN) { @@ -388,6 +388,8 @@ return 0; length = ETH_ZLEN; } + buf = skb->data; + /* Block a timer-based transmit from overlapping */ netif_stop_queue(dev); --- linux-2.4.22/drivers/net/yellowfin.c 2003-06-13 14:51:35.000000000 +0000 +++ linux-2.4.23-pre3/drivers/net/yellowfin.c 2003-09-03 20:35:43.000000000 +0000 @@ -867,8 +867,6 @@ /* Calculate the next Tx descriptor entry. */ entry = yp->cur_tx % TX_RING_SIZE; - yp->tx_skbuff[entry] = skb; - if (gx_fix) { /* Note: only works for paddable protocols e.g. IP. */ int cacheline_end = ((unsigned long)skb->data + skb->len) % 32; /* Fix GX chipset errata. */ @@ -885,6 +883,8 @@ return 0; } } + yp->tx_skbuff[entry] = skb; + #ifdef NO_TXSTATS yp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(yp->pci_dev, skb->data, len, PCI_DMA_TODEVICE));