Commit ed6c1115 authored by Tejun Heo's avatar Tejun Heo Committed by Pekka Enberg

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 9b8327bb
...@@ -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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment