diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1993,6 +1993,9 @@ int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma) | |||
1993 | __vma = find_vma_prepare(mm,vma->vm_start,&prev,&rb_link,&rb_parent); | 1993 | __vma = find_vma_prepare(mm,vma->vm_start,&prev,&rb_link,&rb_parent); |
1994 | if (__vma && __vma->vm_start < vma->vm_end) | 1994 | if (__vma && __vma->vm_start < vma->vm_end) |
1995 | return -ENOMEM; | 1995 | return -ENOMEM; |
1996 | if ((vma->vm_flags & VM_ACCOUNT) && | ||
1997 | security_vm_enough_memory(vma_pages(vma))) | ||
1998 | return -ENOMEM; | ||
1996 | vma_link(mm, vma, prev, rb_link, rb_parent); | 1999 | vma_link(mm, vma, prev, rb_link, rb_parent); |
1997 | return 0; | 2000 | return 0; |
1998 | } | 2001 | } |