]> git.baikalelectronics.ru Git - kernel.git/commit
sh: fix memory corruption of unflattened device tree
authorRich Felker <dalias@libc.org>
Mon, 31 Jul 2017 05:27:50 +0000 (01:27 -0400)
committerRich Felker <dalias@libc.org>
Thu, 12 Apr 2018 23:47:51 +0000 (19:47 -0400)
commitefb73a599e55101d13b3d46143a2661ca0addeaf
treea86769cb20fbc28fc58ef509058ad1a5bc81b97f
parent51a7420104be5ddd770bb8cb30cdad6dfe0e6748
sh: fix memory corruption of unflattened device tree

unflatten_device_tree() makes use of memblock allocation, and
therefore must be called before paging_init() migrates the memblock
allocation data to the bootmem framework. Otherwise the record of the
allocation for the expanded device tree will be lost, and will
eventually be clobbered when allocated for another use.

Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/boards/of-generic.c
arch/sh/kernel/setup.c