提交 93c1d3b7 编写于 作者: F Florin Malita 提交者: Jeff Garzik

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: NFlorin Malita <fmalita@gmail.com>
Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 e9712901
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册