aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@de.ibm.com>2012-05-09 10:27:37 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2012-05-16 08:42:39 -0400
commita686425b31bb6441f6e20d698bf31dc65043f61f (patch)
treef3bebaf302b88c2538bb8c45216f975886d36070 /arch/s390/mm
parent5e8010cb50d3de7202641c0088c211f7c9593ebc (diff)
s390/hugepages: clear page table for sw large page emulation
The software large page emulation on s390 did not clear the the pre-allocated page table in arch_release_hugepage() before freeing it. This could trigger the WARN_ON(!pte_none(*pte) in mm/vmalloc.c:106 and make vmap_pte_range() fail, because the page table could be reused in page_table_alloc(). This is fixed now by calling clear_table() before page_table_free(). Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/hugetlbpage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c
index 597bb2d27c3c..900de2b3cf28 100644
--- a/arch/s390/mm/hugetlbpage.c
+++ b/arch/s390/mm/hugetlbpage.c
@@ -58,6 +58,8 @@ void arch_release_hugepage(struct page *page)
58 ptep = (pte_t *) page[1].index; 58 ptep = (pte_t *) page[1].index;
59 if (!ptep) 59 if (!ptep)
60 return; 60 return;
61 clear_table((unsigned long *) ptep, _PAGE_TYPE_EMPTY,
62 PTRS_PER_PTE * sizeof(pte_t));
61 page_table_free(&init_mm, (unsigned long *) ptep); 63 page_table_free(&init_mm, (unsigned long *) ptep);
62 page[1].index = 0; 64 page[1].index = 0;
63} 65}