projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b8327b
)
percpu: clear memory allocated with the km allocator
author
Tejun Heo
<
[email protected]
>
Fri, 10 Sep 2010 08:49:37 +0000
(10:49 +0200)
committer
Pekka Enberg
<
[email protected]
>
Sat, 2 Oct 2010 07:28:42 +0000
(10:28 +0300)
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]
>
mm/percpu-km.c
patch
|
blob
|
history
diff --git
a/mm/percpu-km.c
b/mm/percpu-km.c
index 7037bc73bfa42a5fd93294f27185a119387dbf17..89633fefc6a2b39d8d32d0204846f4ab8b303930 100644
(file)
--- a/
mm/percpu-km.c
+++ b/
mm/percpu-km.c
@@
-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;
}