mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04: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 <[email protected]> Reported-by: Peter Zijlstra <[email protected]> Acked-by: Peter Zijlstra <[email protected]>
This commit is contained in:
parent
3c9a024fde
commit
fc1481a956
1 changed files with 5 additions and 1 deletions
|
|
@ -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 a new issue