]> www.infradead.org Git - users/dwmw2/linux.git/commit
powerpc/kasan: Fix shadow pages allocation failure
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 19 May 2020 05:48:45 +0000 (05:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jun 2020 07:33:07 +0000 (09:33 +0200)
commitd7c98b30124914727d147da691bc15d31a8859cb
tree1d7f794802eb71cef1d17ed24194af07cfc1aeb1
parentaa2fa3ba500f82520e4ad5f66843f17be12f0d86
powerpc/kasan: Fix shadow pages allocation failure

commit d2a91cef9bbdeb87b7449fdab1a6be6000930210 upstream.

Doing kasan pages allocation in MMU_init is too early, kernel doesn't
have access yet to the entire memory space and memblock_alloc() fails
when the kernel is a bit big.

Do it from kasan_init() instead.

Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support")
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/c24163ee5d5f8cdf52fefa45055ceb35435b8f15.1589866984.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/kasan.h
arch/powerpc/mm/init_32.c
arch/powerpc/mm/kasan/kasan_init_32.c