aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-17 19:11:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-17 19:11:09 -0400
commit1ce6ec91a8528f80442eee7157be1b016248a883 (patch)
tree7a7f6ecf83016a4b9ff3bd357303e0e6b4f585a5 /mm/hugetlb.c
parent96d8683483b7eb194609edd1afe9143a0467b7d3 (diff)
parentb9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f (diff)
Merge branch 'akpm' (fixes from Andrew)
Pull misc fixes from Andrew Morton: "Ten fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: kernel/signal.c: stop info leak via the tkill and the tgkill syscalls mm/vmscan: fix error return in kswapd_run() hfsplus: fix potential overflow in hfsplus_file_truncate() avr32: fix build error in atstk1006_defconfig hugetlbfs: add swap entry check in follow_hugetlb_page() fs/binfmt_elf.c: fix hugetlb memory check in vma_dump_size() hugetlbfs: stop setting VM_DONTDUMP in initializing vma(VM_HUGETLB) checkpatch: fix stringification macro defect drivers/video/mmp/core.c: fix use-after-free bug thinkpad-acpi: kill hotkey_thread_mutex
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ca9a7c6d7e97..1a12f5b9a0ab 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2961,7 +2961,17 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
2961 break; 2961 break;
2962 } 2962 }
2963 2963
2964 if (absent || 2964 /*
2965 * We need call hugetlb_fault for both hugepages under migration
2966 * (in which case hugetlb_fault waits for the migration,) and
2967 * hwpoisoned hugepages (in which case we need to prevent the
2968 * caller from accessing to them.) In order to do this, we use
2969 * here is_swap_pte instead of is_hugetlb_entry_migration and
2970 * is_hugetlb_entry_hwpoisoned. This is because it simply covers
2971 * both cases, and because we can't follow correct pages
2972 * directly from any kind of swap entries.
2973 */
2974 if (absent || is_swap_pte(huge_ptep_get(pte)) ||
2965 ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) { 2975 ((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) {
2966 int ret; 2976 int ret;
2967 2977