diff --git a/init/main.c b/init/main.c index 0ab82a453de5..6d38f9607d14 100644 --- a/init/main.c +++ b/init/main.c @@ -587,7 +587,6 @@ asmlinkage void __init start_kernel(void) * kmem_cache_init() */ pidhash_init(); - vmalloc_init(); vfs_caches_init_early(); sort_main_extable(); trap_init(); @@ -596,6 +595,7 @@ asmlinkage void __init start_kernel(void) */ mem_init(); kmem_cache_init(); + vmalloc_init(); /* * Set up the scheduler prior starting any interrupts (such as the * timer interrupt). Full topology setup happens at smp_init() diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 083716ea38c9..323513858c20 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -1032,7 +1031,7 @@ void __init vmalloc_init(void) /* Import existing vmlist entries. */ for (tmp = vmlist; tmp; tmp = tmp->next) { - va = alloc_bootmem(sizeof(struct vmap_area)); + va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT); va->flags = tmp->flags | VM_VM_AREA; va->va_start = (unsigned long)tmp->addr; va->va_end = va->va_start + tmp->size;