Skip to content
Snippets Groups Projects
Commit fc1481a9 authored by Tejun Heo's avatar Tejun Heo
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarPeter Zijlstra <peterz@infradead.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
parent 3c9a024f
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size) 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; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment