Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=93c1d3b790673bb2a7489d6f165c5c99a7f44baf
Commit:     93c1d3b790673bb2a7489d6f165c5c99a7f44baf
Parent:     e971290133d8151c468cd70206fedc92648feb58
Author:     Florin Malita <[EMAIL PROTECTED]>
AuthorDate: Tue May 22 18:09:42 2007 -0500
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu May 24 17:25:43 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/spider_net.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index c3964c3..ef84d7c 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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to