]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
spidernet: skb used after netif_receive_skb
authorFlorin Malita <fmalita@gmail.com>
Tue, 22 May 2007 23:09:42 +0000 (18:09 -0500)
committerJeff Garzik <jeff@garzik.org>
Thu, 24 May 2007 21:25:43 +0000 (17:25 -0400)
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>
drivers/net/spider_net.c

index c3964c3d89d93e8f6e65b23a16e6d2ef1a1935dd..ef84d7c757a080d8f26b3d2576f3d90a490b7052 100644 (file)
@@ -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