mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
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>
This commit is contained in:
parent
9b8327bb24
commit
ed6c1115c8
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user