]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 9 Dec 2020 05:29:21 +0000 (05:29 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 9 Dec 2020 12:48:13 +0000 (23:48 +1100)
commitce4f72df7afa6b74ce46fc2258a60520cdd33f0d
treeab20a4a1fbe853051910129d06fe2c372ed72667
parent0b14828ba3359a94dfeab02280c69758ec6ab3ec
powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S

The verification and message introduced by commit b4f2de3a4c02
("powerpc/mm/hash: Handle user access of kernel address gracefully")
applies to all platforms, it should not be limited to BOOK3S.

Make the BOOK3S version of sanity_check_fault() the one for all,
and bail out earlier if not BOOK3S.

Fixes: b4f2de3a4c02 ("powerpc/mm/hash: Handle user access of kernel address gracefully")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/fe199d5af3578d3bf80035d203a94d742a7a28af.1607491748.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/fault.c