]> 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)
commitc5c3f73a214188f8eaf5ec4fed98d56687850c02
treea86769cb20fbc28fc58ef509058ad1a5bc81b97f
parentf8800b0677429ff8c5c16d7b4b8d863741a28504
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