[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wsrvyjob.fsf@macbook.be.48ers.dk>
Date: Mon, 03 Dec 2007 14:47:16 +0100
From: Peter Korsgaard <jacmet@...site.dk>
To: Wang Chen <wangchen@...fujitsu.com>
Cc: Jeff Garzik <jgarzik@...ox.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Dustin McIntire <dustin@...soria.com>, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx
>>>>> "Wang" == Wang Chen <wangchen@...fujitsu.com> 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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists