Merge branch 'for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
[sfrench/cifs-2.6.git] / mm / percpu.c
index a0e0c82c1e4cd22324e87a86a5df7301f35b8a83..79e3549cab0f40f30916499f2acca7622379fdc5 100644 (file)
@@ -1856,7 +1856,7 @@ struct pcpu_alloc_info * __init pcpu_alloc_alloc_info(int nr_groups,
                          __alignof__(ai->groups[0].cpu_map[0]));
        ai_size = base_size + nr_units * sizeof(ai->groups[0].cpu_map[0]);
 
-       ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), 0);
+       ptr = memblock_virt_alloc_nopanic(PFN_ALIGN(ai_size), PAGE_SIZE);
        if (!ptr)
                return NULL;
        ai = ptr;
@@ -2719,6 +2719,7 @@ void __init setup_per_cpu_areas(void)
 
        if (pcpu_setup_first_chunk(ai, fc) < 0)
                panic("Failed to initialize percpu areas.");
+       pcpu_free_alloc_info(ai);
 }
 
 #endif /* CONFIG_SMP */