提交 ed6c1115 编写于 作者: T Tejun Heo 提交者: 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: NTejun Heo <tj@kernel.org>
Reported-by: NPeter Zijlstra <peterz@infradead.org>
Acked-by: NPeter Zijlstra <peterz@infradead.org>
上级 9b8327bb
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册