diff options
Diffstat (limited to 'mm/mremap.c')
-rw-r--r-- | mm/mremap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/mremap.c b/mm/mremap.c index a48125178..d1f6a7b8b 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -225,6 +225,10 @@ unsigned long do_mremap(unsigned long addr, /* We can't remap across vm area boundaries */ if (old_len > vma->vm_end - addr) goto out; + if (vma->vm_flags & VM_DONTEXPAND) { + if (new_len > old_len) + goto out; + } if (vma->vm_flags & VM_LOCKED) { unsigned long locked = current->mm->locked_vm << PAGE_SHIFT; locked += new_len - old_len; |