diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 0617c12aebe4..ae4f0fc2f01b 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2331,12 +2331,11 @@ int expand_downwards(struct vm_area_struct *vma, struct mm_struct *mm = vma->vm_mm; struct vm_area_struct *prev; unsigned long gap_addr; - int error; + int error = 0; address &= PAGE_MASK; - error = security_mmap_addr(address); - if (error) - return error; + if (address < mmap_min_addr) + return -EPERM; /* Enforce stack_guard_gap */ gap_addr = address - stack_guard_gap; |