summaryrefslogtreecommitdiff
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-04-25 11:02:35 (GMT)
committerTakashi Iwai <tiwai@suse.de>2013-04-25 11:02:35 (GMT)
commit2fc565e4eaf8fc633bfc741b90e1f28dba732ee1 (patch)
tree98c994692f84aee07cf1c7b4cda245ae5235a94d /mm/hugetlb.c
parent7fc7d047216aa4923d401c637be2ebc6e3d5bd9b (diff)
parent5cc50fc858a5ab37dc2744d72d7ffed96f23afd8 (diff)
downloadlinux-fsl-qoriq-2fc565e4eaf8fc633bfc741b90e1f28dba732ee1.tar.xz
Merge tag 'asoc-v3.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.10 A few more fixes, nothing too major though the DMA changes fix modular builds.
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 ca9a7c6..1a12f5b 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,
break;
}
- if (absent ||
+ /*
+ * We need call hugetlb_fault for both hugepages under migration
+ * (in which case hugetlb_fault waits for the migration,) and
+ * hwpoisoned hugepages (in which case we need to prevent the
+ * caller from accessing to them.) In order to do this, we use
+ * here is_swap_pte instead of is_hugetlb_entry_migration and
+ * is_hugetlb_entry_hwpoisoned. This is because it simply covers
+ * both cases, and because we can't follow correct pages
+ * directly from any kind of swap entries.
+ */
+ if (absent || is_swap_pte(huge_ptep_get(pte)) ||
((flags & FOLL_WRITE) && !pte_write(huge_ptep_get(pte)))) {
int ret;