]> git.baikalelectronics.ru Git - kernel.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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 May 2020 13:41:02 +0000 (23:41 +1000)
commite7a1a6fb3e7846b63ce733e8014d80f520de56cd
tree6e938f42ddbb0115d5fe5a07c5bca54546f53c4c
parent572b79f54f2908eb4b2c1b3d8341d03c47ab3832
powerpc/kasan: Fix shadow pages allocation failure

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: d54d8e0d3af0 ("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
arch/powerpc/include/asm/kasan.h
arch/powerpc/mm/init_32.c
arch/powerpc/mm/kasan/kasan_init_32.c