s390/mm,fault: use get_kernel_nofault() to dereference in dump_pagetable()
authorHeiko Carstens <hca@linux.ibm.com>
Thu, 12 Oct 2023 07:40:44 +0000 (09:40 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 23 Oct 2023 16:21:22 +0000 (18:21 +0200)
commitf67c2da9f1c2d56e3adab342fc39c00c0c5ec790
tree7ba036c152dcc105b2377e27bbf9f754bd535b14
parent5be05c35e72f7492105987e0231afab46b69935e
s390/mm,fault: use get_kernel_nofault() to dereference in dump_pagetable()

The page table dumper uses get_kernel_nofault() to test if dereferencing
page table entries is possible. Use the result, which is the required page
table entry, instead of throwing it away and dereferencing a second time
without any safe guard.

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/mm/fault.c