]> www.infradead.org Git - users/dwmw2/linux.git/commit
s390/mm: fix dump_pagetables top level page table walking
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 26 Jul 2019 06:23:20 +0000 (08:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:30:15 +0000 (08:30 +0200)
commitd810001f3e92f16229ae57838f9f4554bc5533d5
tree5e62512f62c404fcc4bf0e6f02e4870dac413124
parent580b216496b67126c2514c81da3b89800abcc042
s390/mm: fix dump_pagetables top level page table walking

[ Upstream commit 8024b5a9fc2bed9a00f0bdba60b443fa3cc4bb5d ]

Since commit d1874a0c2805 ("s390/mm: make the pxd_offset functions more
robust") behaviour of p4d_offset, pud_offset and pmd_offset has been
changed so that they cannot be used to iterate through top level page
table, because the index for the top level page table is now calculated
in pgd_offset. To avoid dumping the very first region/segment top level
table entry 2048 times simply iterate entry pointer like it is already
done in other page walking cases.

Fixes: d1874a0c2805 ("s390/mm: make the pxd_offset functions more robust")
Reported-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/mm/dump_pagetables.c