aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorFlorin Malita <fmalita@gmail.com>2007-05-22 19:09:42 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-24 17:25:43 -0400
commit93c1d3b790673bb2a7489d6f165c5c99a7f44baf (patch)
tree08514dbd16c00755818fcece92d2da26df3830c7 /drivers/net/spider_net.c
parente971290133d8151c468cd70206fedc92648feb58 (diff)
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 <fmalita@gmail.com> Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index c3964c3d89d9..ef84d7c757a0 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,
1014 */ 1014 */
1015 } 1015 }
1016 1016
1017 /* pass skb up to stack */
1018 netif_receive_skb(skb);
1019
1020 /* update netdevice statistics */ 1017 /* update netdevice statistics */
1021 card->netdev_stats.rx_packets++; 1018 card->netdev_stats.rx_packets++;
1022 card->netdev_stats.rx_bytes += skb->len; 1019 card->netdev_stats.rx_bytes += skb->len;
1020
1021 /* pass skb up to stack */
1022 netif_receive_skb(skb);
1023} 1023}
1024 1024
1025#ifdef DEBUG 1025#ifdef DEBUG