From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] NET : Corrects a bug in ip_rt_acct_read()
Date: Fri, 16 Nov 2007 02:32:08 -0800 (PST) [thread overview]
Message-ID: <20071116.023208.188367224.davem@davemloft.net> (raw)
In-Reply-To: <20071116112519.ecbb96ae.dada1@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 16 Nov 2007 11:25:19 +0100
> [PATCH] NET : Corrects a bug in ip_rt_acct_read()
>
> It seems that stats of cpu 0 are counted twice, since
> for_each_possible_cpu() is looping on all possible cpus,
> including 0
>
> Before percpu conversion of ip_rt_acct, we should also remove
> the assumption that CPU 0 is online (or even possible)
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Applied, good catch Eric.
To make things easier for you I've applied it to both
net-2.6 and net-2.6.25
It seems like the code was trying to avoid that initial
memset, grabbing the first cpu explicitly and then copying
along the way. But the loop iterator wasn't adjusted
correctly and of course the zero-cpu-assumption you
noticed as well plays into this :-)
prev parent reply other threads:[~2007-11-16 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-16 10:25 [PATCH] NET : Corrects a bug in ip_rt_acct_read() Eric Dumazet
2007-11-16 10:32 ` David Miller [this message]
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=20071116.023208.188367224.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dada1@cosmosbay.com \
--cc=netdev@vger.kernel.org \
/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).