Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed6c1115 authored by Tejun Heo's avatar Tejun Heo Committed by Pekka Enberg
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 9b8327bb
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
}