]> git.baikalelectronics.ru Git - kernel.git/commit
um: Setup physical memory in setup_arch()
authorRichard Weinberger <richard@nod.at>
Sun, 12 Jun 2016 19:56:42 +0000 (21:56 +0200)
committerRichard Weinberger <richard@nod.at>
Wed, 3 Aug 2016 22:00:46 +0000 (00:00 +0200)
commit275a89015a965b38864274e3c77a350d32a938ed
tree3ff4ece1a7b4cf62e863ad23edf1f0a40d1148cd
parent6c8e7cf99edc162b3095b10984409ce989c5c8c9
um: Setup physical memory in setup_arch()

Currently UML sets up physical memory very early,
long before setup_arch() was called by the kernel main
function.
This can cause problems when code paths in UML's memory setup
code assume that the kernel is already running.
i.e. when kmemleak is enabled it will evaluate current()
in free_bootmem(). That early current() is undefined and
UML explodes.

Solve the problem by setting up physical memory in setup_arch(),
at this stage the kernel has materialized and basic infrastructure
such as current() works.

Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/kernel/um_arch.c