In previous version of the kernel, a huge zero page is remapped
to normal pte mappings with PTE_SPECIAL flag when the split of
hugepage is requested. It makes a buggy situation when the
kernel tries to find a page with vm_normal_page.
This patch resolves this problem by adding a condition to if-
statement.
Change-Id: I62946d3c3e92be309ccbe987f24a33503a7e23dc
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
repeat:
#ifdef CONFIG_FINEGRAINED_THP
- if (pmd_trans_huge(*pmd) && !vm_normal_page_pmd(vma, address, *pmd)) {
+ if (pmd_trans_huge(*pmd) && !vm_normal_page_pmd(vma, address, *pmd) && !is_huge_zero_pmd(*pmd)) {
struct mm_struct *mm = vma->vm_mm;
unsigned long haddr = address & HPAGE_PMD_MASK;
pmd_t orig_pmd;