From: Florin Malita Date: Tue, 22 May 2007 23:09:42 +0000 (-0500) Subject: spidernet: skb used after netif_receive_skb X-Git-Tag: v2.6.22-rc3~12^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=93c1d3b790673bb2a7489d6f165c5c99a7f44baf;p=linux-2.6-omap-h63xx.git spidernet: skb used after netif_receive_skb The stats update code in spider_net_pass_skb_up() is touching the skb after it's been passed up to the stack. To avoid that, just update the stats first. Signed-off-by: Florin Malita Signed-off-by: Linas Vepstas Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index c3964c3d89d..ef84d7c757a 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c @@ -1014,12 +1014,12 @@ spider_net_pass_skb_up(struct spider_net_descr *descr, */ } - /* pass skb up to stack */ - netif_receive_skb(skb); - /* update netdevice statistics */ card->netdev_stats.rx_packets++; card->netdev_stats.rx_bytes += skb->len; + + /* pass skb up to stack */ + netif_receive_skb(skb); } #ifdef DEBUG