]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kasan: Fix shadow pages allocation failure
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 2 Jul 2020 11:52:03 +0000 (11:52 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jul 2020 02:04:39 +0000 (12:04 +1000)
commitb8259e890e62a346c99d18384cfa2ef2864ec1e4
tree724bc70216e7b370ee3a2dcb698d037cf0a8ffd7
parent331ce4fdf3b52b91365259cb55931d4b5ea0e219
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: 7708d0f90a64 ("powerpc/32: Add KASAN support")
Fixes: 63f05b012dcb ("powerpc/kasan: Fix shadow pages allocation failure")
Cc: stable@vger.kernel.org
Reported-by: Erhard F. <erhard_f@mailbox.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=208181
Link: https://lore.kernel.org/r/63048fcea8a1c02f75429ba3152f80f7853f87fc.1593690707.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/kasan/kasan_init_32.c