diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-06-30 14:26:00 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-06-30 14:26:00 +0800 |
commit | 267aa95e09eec438abf8979b58cded5cbc5586cb (patch) | |
tree | 7401fc52691565f31c0ad96a94a7a54971cc6e6a /mm/memory.c | |
parent | d87abdcbf8871b5ee58083b3bdf216ba406224b9 (diff) | |
parent | 6ee496d7218aeccffe5380cb65e9d50d1a61c323 (diff) |
Merge tag 'v4.4.75' into linux-linaro-lsk-v4.4lsk-v4.4-17.06
This is the 4.4.75 stable release
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/mm/memory.c b/mm/memory.c index 76dcee317714..e6fa13484447 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2662,40 +2662,6 @@ out_release: } /* - * This is like a special single-page "expand_{down|up}wards()", - * except we must first make sure that 'address{-|+}PAGE_SIZE' - * doesn't hit another vma. - */ -static inline int check_stack_guard_page(struct vm_area_struct *vma, unsigned long address) -{ - address &= PAGE_MASK; - if ((vma->vm_flags & VM_GROWSDOWN) && address == vma->vm_start) { - struct vm_area_struct *prev = vma->vm_prev; - - /* - * Is there a mapping abutting this one below? - * - * That's only ok if it's the same stack mapping - * that has gotten split.. - */ - if (prev && prev->vm_end == address) - return prev->vm_flags & VM_GROWSDOWN ? 0 : -ENOMEM; - - return expand_downwards(vma, address - PAGE_SIZE); - } - if ((vma->vm_flags & VM_GROWSUP) && address + PAGE_SIZE == vma->vm_end) { - struct vm_area_struct *next = vma->vm_next; - - /* As VM_GROWSDOWN but s/below/above/ */ - if (next && next->vm_start == address + PAGE_SIZE) - return next->vm_flags & VM_GROWSUP ? 0 : -ENOMEM; - - return expand_upwards(vma, address + PAGE_SIZE); - } - return 0; -} - -/* * We enter with non-exclusive mmap_sem (to exclude vma changes, * but allow concurrent faults), and pte mapped but not yet locked. * We return with mmap_sem still held, but pte unmapped and unlocked. @@ -2715,10 +2681,6 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, if (vma->vm_flags & VM_SHARED) return VM_FAULT_SIGBUS; - /* Check if we need to add a guard page to the stack */ - if (check_stack_guard_page(vma, address) < 0) - return VM_FAULT_SIGSEGV; - /* Use the zero-page for reads */ if (!(flags & FAULT_FLAG_WRITE) && !mm_forbids_zeropage(mm)) { entry = pte_mkspecial(pfn_pte(my_zero_pfn(address), |