summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-30 01:25:12 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-30 01:25:12 +0000
commit54596889178f6166c48900ee55466712ecb1d006 (patch)
tree7984786abad9c87d26b314bfd82f1e17e2ba735a /drivers
parentc9840e5b3ac310a6fc843cfaa864b183fbbf5684 (diff)
When skb allocation fails in the rx interrupt handler the skb was
reused even though it was alredy passed of to the network stack, possibly resulting in corruption or even crash.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ioc3-eth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index fed7b8ced..958a4088c 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -432,9 +432,6 @@ ioc3_rx(struct net_device *dev, struct ioc3_private *ip, struct ioc3 *ioc3)
len = (w0 >> ERXBUF_BYTECNT_SHIFT) & 0x7ff;
skb_trim(skb, len);
skb->protocol = eth_type_trans(skb, dev);
- netif_rx(skb);
-
- ip->rx_skbs[rx_entry] = NULL; /* Poison */
new_skb = ioc3_alloc_skb(RX_BUF_ALLOC_SIZE, GFP_ATOMIC);
if (!new_skb) {
@@ -444,6 +441,9 @@ ioc3_rx(struct net_device *dev, struct ioc3_private *ip, struct ioc3 *ioc3)
new_skb = skb;
goto next;
}
+ netif_rx(skb);
+
+ ip->rx_skbs[rx_entry] = NULL; /* Poison */
new_skb->dev = dev;