|
@@ -2391,12 +2391,11 @@ int expand_downwards(struct vm_area_struct *vma,
|
|
|
{
|
|
{
|
|
|
struct mm_struct *mm = vma->vm_mm;
|
|
struct mm_struct *mm = vma->vm_mm;
|
|
|
struct vm_area_struct *prev;
|
|
struct vm_area_struct *prev;
|
|
|
- int error;
|
|
|
|
|
|
|
+ int error = 0;
|
|
|
|
|
|
|
|
address &= PAGE_MASK;
|
|
address &= PAGE_MASK;
|
|
|
- error = security_mmap_addr(address);
|
|
|
|
|
- if (error)
|
|
|
|
|
- return error;
|
|
|
|
|
|
|
+ if (address < mmap_min_addr)
|
|
|
|
|
+ return -EPERM;
|
|
|
|
|
|
|
|
/* Enforce stack_guard_gap */
|
|
/* Enforce stack_guard_gap */
|
|
|
prev = vma->vm_prev;
|
|
prev = vma->vm_prev;
|