aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 19:49:17 -0400
commit1dcf58d6e6e6eb7ec10e9abc56887b040205b06f (patch)
treec03e7a25ef13eea62f1547914a76e5c68f3f4c28 /mm/hugetlb.c
parent80dcc31fbe55932ac9204daee5f2ebc0c49b6da3 (diff)
parente4b0db72be2487bae0e3251c22f82c104f7c1cfd (diff)
Merge branch 'akpm' (patches from Andrew)
Merge first patchbomb from Andrew Morton: - arch/sh updates - ocfs2 updates - kernel/watchdog feature - about half of mm/ * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (122 commits) Documentation: update arch list in the 'memtest' entry Kconfig: memtest: update number of test patterns up to 17 arm: add support for memtest arm64: add support for memtest memtest: use phys_addr_t for physical addresses mm: move memtest under mm mm, hugetlb: abort __get_user_pages if current has been oom killed mm, mempool: do not allow atomic resizing memcg: print cgroup information when system panics due to panic_on_oom mm: numa: remove migrate_ratelimited mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE mm: split ET_DYN ASLR from mmap ASLR s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE mm: expose arch_mmap_rnd when available s390: standardize mmap_rnd() usage powerpc: standardize mmap_rnd() usage mips: extract logic for mmap_rnd() arm64: standardize mmap_rnd() usage x86: standardize mmap_rnd() usage arm: factor out mmap ASLR into mmap_rnd ...
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c41b2a0ee273..8874c8ad55aa 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3278,6 +3278,15 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
3278 struct page *page; 3278 struct page *page;
3279 3279
3280 /* 3280 /*
3281 * If we have a pending SIGKILL, don't keep faulting pages and
3282 * potentially allocating memory.
3283 */
3284 if (unlikely(fatal_signal_pending(current))) {
3285 remainder = 0;
3286 break;
3287 }
3288
3289 /*
3281 * Some archs (sparc64, sh*) have multiple pte_ts to 3290 * Some archs (sparc64, sh*) have multiple pte_ts to
3282 * each hugepage. We have to make sure we get the 3291 * each hugepage. We have to make sure we get the
3283 * first, for the page indexing below to work. 3292 * first, for the page indexing below to work.
@@ -3735,8 +3744,7 @@ retry:
3735 if (!pmd_huge(*pmd)) 3744 if (!pmd_huge(*pmd))
3736 goto out; 3745 goto out;
3737 if (pmd_present(*pmd)) { 3746 if (pmd_present(*pmd)) {
3738 page = pte_page(*(pte_t *)pmd) + 3747 page = pmd_page(*pmd) + ((address & ~PMD_MASK) >> PAGE_SHIFT);
3739 ((address & ~PMD_MASK) >> PAGE_SHIFT);
3740 if (flags & FOLL_GET) 3748 if (flags & FOLL_GET)
3741 get_page(page); 3749 get_page(page);
3742 } else { 3750 } else {