Skip to content

Commit

Permalink
[S390] fix page table walk for changing page attributes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Apr 20, 2011
1 parent c708c57 commit e4c031b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/s390/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ static void change_page_attr(unsigned long addr, int numpages,
WARN_ON_ONCE(1);
continue;
}
ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE);
ptep = pte_offset_kernel(pmdp, addr);

pte = *ptep;
pte = set(pte);
ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep);
ptep_invalidate(&init_mm, addr, ptep);
*ptep = pte;
addr += PAGE_SIZE;
}
}

Expand Down

0 comments on commit e4c031b

Please sign in to comment.