From: Randy Dunlap <randy.dunlap@oracle.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <htejun@gmail.com>,
Stephane Eranian <eranian@google.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
davem@davemloft.net, fweisbec@gmail.com,
perfmon2-devel@lists.sf.net, eranian@gmail.com,
robert.richter@amd.com, acme@redhat.com
Subject: Re: [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator
Date: Fri, 10 Sep 2010 09:31:15 -0700 [thread overview]
Message-ID: <20100910093115.2f0859af.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1284108918.402.31.camel@laptop>
On Fri, 10 Sep 2010 10:55:18 +0200 Peter Zijlstra wrote:
> On Fri, 2010-09-10 at 10:52 +0200, Tejun Heo wrote:
> > Percpu allocator should clear memory before returning it but the km
> > allocator forgot to do it. Fix it.
> >
> > Signed-off-by: Tejun Heo <tj@kernel.org>
> > Spotted-by: Peter Zijlstra <peterz@infradead.org>
>
> (fwiw, -tip uses Reported-by)
fyi, Documentation/SubmittingPatches does also.
> Acked-by: Peter Zijlstra <peterz@infradead.org>
>
> > ---
> > mm/percpu-km.c | 6 +++++-
> > 1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/mm/percpu-km.c b/mm/percpu-km.c
> > index 7037bc7..89633fe 100644
> > --- a/mm/percpu-km.c
> > +++ b/mm/percpu-km.c
> > @@ -35,7 +35,11 @@
> >
> > static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size)
> > {
> > - /* noop */
> > + unsigned int cpu;
> > +
> > + for_each_possible_cpu(cpu)
> > + memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size);
> > +
> > return 0;
> > }
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2010-09-10 16:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-09 13:09 [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3) Stephane Eranian
2010-09-09 13:52 ` Eric Dumazet
2010-09-09 21:41 ` Stephane Eranian
2010-09-10 8:16 ` Peter Zijlstra
2010-09-10 8:41 ` Tejun Heo
2010-09-10 8:52 ` [PATCH percpu#for-next] percpu: clear memory allocated with the km allocator Tejun Heo
2010-09-10 8:55 ` Peter Zijlstra
2010-09-10 16:31 ` Randy Dunlap [this message]
2010-09-10 16:45 ` Ingo Molnar
2010-09-10 23:28 ` Tejun Heo
2010-09-10 8:59 ` [RFC PATCH 1/2] perf_events: add support for per-cpu per-cgroup monitoring (v3) Stephane Eranian
2010-09-10 9:03 ` [PATCH] percpu: update comments to reflect that percpu allocations are always zero-filled Tejun Heo
2010-09-10 9:07 ` Stephane Eranian
2010-09-10 9:09 ` Eric Dumazet
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=20100910093115.2f0859af.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=eranian@gmail.com \
--cc=eranian@google.com \
--cc=eric.dumazet@gmail.com \
--cc=fweisbec@gmail.com \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sf.net \
--cc=peterz@infradead.org \
--cc=robert.richter@amd.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