diff options
author | Tejun Heo <tj@kernel.org> | 2010-09-10 04:49:37 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-10-02 03:28:42 -0400 |
commit | ed6c1115c835d822ec5d6356ae3043de54088f43 (patch) | |
tree | b25aa10f14fa60c7444d8ca5fe97c84f12801429 /mm | |
parent | 9b8327bb2483ded5e04df6c33cf339ce7c02f6e9 (diff) |
percpu: clear memory allocated with the km allocator
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>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'mm')
-rw-r--r-- | 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 7037bc73bfa4..89633fefc6a2 100644 --- a/mm/percpu-km.c +++ b/mm/percpu-km.c | |||
@@ -35,7 +35,11 @@ | |||
35 | 35 | ||
36 | static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) | 36 | static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) |
37 | { | 37 | { |
38 | /* noop */ | 38 | unsigned int cpu; |
39 | |||
40 | for_each_possible_cpu(cpu) | ||
41 | memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size); | ||
42 | |||
39 | return 0; | 43 | return 0; |
40 | } | 44 | } |
41 | 45 | ||