powerpc: Don't ignore errors from set_memory_{n}p() in __kernel_map_pages()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 16 Feb 2024 10:17:34 +0000 (11:17 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Mar 2024 11:18:45 +0000 (22:18 +1100)
commit9cbacb834b4afcb55eb8ac5115fa82fc7ede5c83
treeecc655227ddf3507515e9aea2664c8605564c524
parent3c8016e681c5e0f5f3ad15edb4569727cd32eaff
powerpc: Don't ignore errors from set_memory_{n}p() in __kernel_map_pages()

set_memory_p() and set_memory_np() can fail.

As mentioned in linux/mm.h:

/*
 * To support DEBUG_PAGEALLOC architecture must ensure that
 * __kernel_map_pages() never fails
 */

So panic in case set_memory_p() or set_memory_np() fail
in __kernel_map_pages().

Link: https://github.com/KSPP/linux/issues/7
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20ef75884aa6a636e8298736f3d1056b0793d3d9.1708078640.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/book3s64/hash_utils.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/pageattr.c