um: Fix to call read_initrd after init_bootmem
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 27 Apr 2017 03:15:10 +0000 (12:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:44:47 +0000 (15:44 +0200)
commitcc0aa21de47c64f7eb557bd41447a9ebe312c0ab
tree4af61603122a78170f02aa62590cae42f4c5cfb0
parent541c678441980b48d3600d1bda0737219eb81f61
um: Fix to call read_initrd after init_bootmem

commit 5b4236e17cc1bd9fa14b2b0c7a4ae632d41f2e20 upstream.

Since read_initrd() invokes alloc_bootmem() for allocating
memory to load initrd image, it must be called after init_bootmem.

This makes read_initrd() called directly from setup_arch()
after init_bootmem() and mem_total_pages().

Fixes: b63236972e1 ("um: Setup physical memory in setup_arch()")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/um/kernel/initrd.c
arch/um/kernel/um_arch.c