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)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 6 Aug 2019 11:58:34 +0000 (13:58 +0200)
commit8024b5a9fc2bed9a00f0bdba60b443fa3cc4bb5d
treef50d0805dd78b45781b6c0757f6938f566799341
parenta287a49e672d9762bb85de117b477bdf3ef20bd5
s390/mm: fix dump_pagetables top level page table walking

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>
arch/s390/mm/dump_pagetables.c