Skip to content

Commit

Permalink
SMC911X: Fix using of dereferenced skb after netif_rx
Browse files Browse the repository at this point in the history
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Wang Chen authored and Jeff Garzik committed Dec 4, 2007
1 parent 8cfcbe9 commit d30f53a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/smc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,9 +1299,9 @@ smc911x_rx_dma_irq(int dma, void *data)
PRINT_PKT(skb->data, skb->len);
dev->last_rx = jiffies;
skb->protocol = eth_type_trans(skb, dev);
netif_rx(skb);
dev->stats.rx_packets++;
dev->stats.rx_bytes += skb->len;
netif_rx(skb);

spin_lock_irqsave(&lp->lock, flags);
pkts = (SMC_GET_RX_FIFO_INF() & RX_FIFO_INF_RXSUSED_) >> 16;
Expand Down

0 comments on commit d30f53a

Please sign in to comment.