powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 29 Nov 2019 14:26:41 +0000 (14:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jan 2020 09:00:59 +0000 (10:00 +0100)
commit618e593b090202383d5dc5336e4aa7692c0e2d61
treeabc8983c63057d5f6471dd17ffe65268edc842ba
parent0254daa0aebbb27f777e1423e535dcae37f7a191
powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE

commit 71eb40fc53371bc247c8066ae76ad9e22ae1e18d upstream.

When enabling CONFIG_RELOCATABLE and CONFIG_KASAN on FSL_BOOKE,
the kernel doesn't boot.

relocate_init() requires KASAN early shadow area to be set up because
it needs access to the device tree through generic functions.

Call kasan_early_init() before calling relocate_init()

Reported-by: Lexi Shao <shaolexi@huawei.com>
Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b58426f1664a4b344ff696d18cacf3b3e8962111.1575036985.git.christophe.leroy@c-s.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/head_fsl_booke.S