diff options
author | James Morris <james.l.morris@oracle.com> | 2017-03-28 02:03:35 +0200 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2017-03-28 02:03:35 +0200 |
commit | 840c91dc6a13b160f5b6e5c79c430dffac11c945 (patch) | |
tree | 5309824f4531b2611a575e7971a935d2e95feb02 /mm/huge_memory.c | |
parent | LSM: Initialize security_hook_heads upon registration. (diff) | |
parent | Linux 4.11-rc4 (diff) | |
download | linux-840c91dc6a13b160f5b6e5c79c430dffac11c945.tar.xz linux-840c91dc6a13b160f5b6e5c79c430dffac11c945.zip |
update to v4.11-rc4 due to memory corruption bug in rc2
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index d36b2af4d1bf..1ebc93e179f3 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1828,7 +1828,7 @@ static void __split_huge_pud_locked(struct vm_area_struct *vma, pud_t *pud, VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PUD_SIZE, vma); VM_BUG_ON(!pud_trans_huge(*pud) && !pud_devmap(*pud)); - count_vm_event(THP_SPLIT_PMD); + count_vm_event(THP_SPLIT_PUD); pudp_huge_clear_flush_notify(vma, haddr, pud); } @@ -2048,6 +2048,7 @@ void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address, bool freeze, struct page *page) { pgd_t *pgd; + p4d_t *p4d; pud_t *pud; pmd_t *pmd; @@ -2055,7 +2056,11 @@ void split_huge_pmd_address(struct vm_area_struct *vma, unsigned long address, if (!pgd_present(*pgd)) return; - pud = pud_offset(pgd, address); + p4d = p4d_offset(pgd, address); + if (!p4d_present(*p4d)) + return; + + pud = pud_offset(p4d, address); if (!pud_present(*pud)) return; |