aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-09-24 05:50:34 -0400
committerTejun Heo <tj@kernel.org>2009-09-28 20:17:57 -0400
commitfb59e72e7e10fd9d31f4e522f1b28254c2cc8a6c (patch)
tree56d4dccd4bafd1fbd61744cd09888f6d4c80abb5 /mm
parentffe0d5a575459ffe664b0762130b557f826fcace (diff)
percpu: make pcpu_build_alloc_info() clear static buffers
pcpu_build_alloc_info() may be called multiple times when percpu is falling back to different first chunk allocator. Make it clear static buffers so that they don't contain values from previous runs. Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/percpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index e5c4cbda6026..a64133f8af45 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1347,6 +1347,10 @@ struct pcpu_alloc_info * __init pcpu_build_alloc_info(
1347 struct pcpu_alloc_info *ai; 1347 struct pcpu_alloc_info *ai;
1348 unsigned int *cpu_map; 1348 unsigned int *cpu_map;
1349 1349
1350 /* this function may be called multiple times */
1351 memset(group_map, 0, sizeof(group_map));
1352 memset(group_cnt, 0, sizeof(group_map));
1353
1350 /* 1354 /*
1351 * Determine min_unit_size, alloc_size and max_upa such that 1355 * Determine min_unit_size, alloc_size and max_upa such that
1352 * alloc_size is multiple of atom_size and is the smallest 1356 * alloc_size is multiple of atom_size and is the smallest