diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2012-12-12 16:52:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 20:38:35 -0500 |
commit | 8c4894c6bc790d0e31e072202939ac6747bbe7ac (patch) | |
tree | 9ebb05f3ccb1e5f810f25916cf61a8913eaca1fe /mm/hugetlb.c | |
parent | 4128997b5f0e7ad583a5f3990051b8188b39055c (diff) |
hwpoison, hugetlbfs: fix "bad pmd" warning in unmapping hwpoisoned hugepage
When a process which used a hwpoisoned hugepage tries to exit() or
munmap(), the kernel can print out "bad pmd" message because page table
walker in free_pgtables() encounters 'hwpoisoned entry' on pmd.
This is because currently we fail to clear the hwpoisoned entry in
__unmap_hugepage_range(), so this patch simply does it.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bd22bd895299..e53f39cd67db 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2386,8 +2386,10 @@ again: | |||
2386 | /* | 2386 | /* |
2387 | * HWPoisoned hugepage is already unmapped and dropped reference | 2387 | * HWPoisoned hugepage is already unmapped and dropped reference |
2388 | */ | 2388 | */ |
2389 | if (unlikely(is_hugetlb_entry_hwpoisoned(pte))) | 2389 | if (unlikely(is_hugetlb_entry_hwpoisoned(pte))) { |
2390 | pte_clear(mm, address, ptep); | ||
2390 | continue; | 2391 | continue; |
2392 | } | ||
2391 | 2393 | ||
2392 | page = pte_page(pte); | 2394 | page = pte_page(pte); |
2393 | /* | 2395 | /* |