From: Peter Korsgaard <jacmet@sunsite.dk>
To: Wang Chen <wangchen@cn.fujitsu.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Dustin McIntire <dustin@sensoria.com>,
davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx
Date: Mon, 03 Dec 2007 14:47:16 +0100 [thread overview]
Message-ID: <87wsrvyjob.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <4753D7F3.3050201@cn.fujitsu.com> (Wang Chen's message of "Mon\, 03 Dec 2007 18\:18\:27 +0800")
>>>>> "Wang" == Wang Chen <wangchen@cn.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
next prev parent reply other threads:[~2007-12-03 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 7:59 [PATCH] SMC911X: Fix using of dereferenced skb after netif_rx Wang Chen
2007-12-03 10:11 ` Herbert Xu
2007-12-03 10:18 ` Wang Chen
2007-12-03 13:47 ` Peter Korsgaard [this message]
2007-12-04 2:01 ` Wang Chen
2007-12-04 8:49 ` Peter Korsgaard
2007-12-04 19:54 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wsrvyjob.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=davem@davemloft.net \
--cc=dustin@sensoria.com \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=wangchen@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).