summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorRich Felker2017-07-31 07:27:50 +0200
committerRich Felker2018-04-13 01:47:51 +0200
commiteb6b6930a70faefe04479a71088cc10366782d9a (patch)
treea86769cb20fbc28fc58ef509058ad1a5bc81b97f /arch/sh/boards
parentsh: fix futex FUTEX_OP_SET op on userspace addresses (diff)
downloadkernel-qcow2-linux-eb6b6930a70faefe04479a71088cc10366782d9a.tar.gz
kernel-qcow2-linux-eb6b6930a70faefe04479a71088cc10366782d9a.tar.xz
kernel-qcow2-linux-eb6b6930a70faefe04479a71088cc10366782d9a.zip
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>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/of-generic.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c
index 4feb7c86f4ac..46b2481eec90 100644
--- a/arch/sh/boards/of-generic.c
+++ b/arch/sh/boards/of-generic.c
@@ -126,12 +126,6 @@ static void __init sh_of_setup(char **cmdline_p)
{
struct device_node *root;
-#ifdef CONFIG_USE_BUILTIN_DTB
- unflatten_and_copy_device_tree();
-#else
- unflatten_device_tree();
-#endif
-
board_time_init = sh_of_time_init;
sh_mv.mv_name = "Unknown SH model";