aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2011-04-20 04:15:32 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-04-20 04:15:43 -0400
commite4c031b4f2515e9531d71c8aa779799231dbcd0c (patch)
tree1fc12df988d36cf50500d2014625a5e2ca8a15fb /arch/s390/mm
parentc708c57e247775928b9a6bce7b4d8d14883bf39b (diff)
[S390] fix page table walk for changing page attributes
The page table walk for changing page attributes used the wrong address for pgd/pud/pmd lookups if the range was bigger than a pmd entry. Fix the lookup by using the correct address. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/pageattr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c
index 122ffbd08ce0..0607e4b14b27 100644
--- a/arch/s390/mm/pageattr.c
+++ b/arch/s390/mm/pageattr.c
@@ -24,12 +24,13 @@ static void change_page_attr(unsigned long addr, int numpages,
24 WARN_ON_ONCE(1); 24 WARN_ON_ONCE(1);
25 continue; 25 continue;
26 } 26 }
27 ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE); 27 ptep = pte_offset_kernel(pmdp, addr);
28 28
29 pte = *ptep; 29 pte = *ptep;
30 pte = set(pte); 30 pte = set(pte);
31 ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep); 31 ptep_invalidate(&init_mm, addr, ptep);
32 *ptep = pte; 32 *ptep = pte;
33 addr += PAGE_SIZE;
33 } 34 }
34} 35}
35 36