diff --git a/mm/mmap.c b/mm/mmap.c index 0da3ca75e174..7598c2598f72 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2256,12 +2256,11 @@ int expand_downwards(struct vm_area_struct *vma, unsigned long address) { struct vm_area_struct *prev; - 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 */ prev = vma->vm_prev;