Subject: Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx

From: Peter Korsgaard <[email-masked]>
Date: Mon, 03 Dec 2007 14:47:16 +0100

>>>>> "Wang" == Wang Chen <[email-masked]> writes:

Hi,

 Wang> +	len = skb->len;
 Wang>  	netif_rx(skb);
 dev-> stats.rx_packets++;
 Wang> -	dev->stats.rx_bytes += skb->len;
 Wang> +	dev->stats.rx_bytes += len;

Why not simply update the stats before calling netif_rx as the return
value isn't checked anyway?

-- 
Bye, Peter Korsgaard