diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1880,6 +1880,10 @@ unsigned long do_brk(unsigned long addr, unsigned long len) | |||
1880 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) | 1880 | if ((addr + len) > TASK_SIZE || (addr + len) < addr) |
1881 | return -EINVAL; | 1881 | return -EINVAL; |
1882 | 1882 | ||
1883 | error = is_hugepage_only_range(current->mm, addr, len); | ||
1884 | if (error) | ||
1885 | return error; | ||
1886 | |||
1883 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; | 1887 | flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags; |
1884 | 1888 | ||
1885 | error = arch_mmap_check(addr, len, flags); | 1889 | error = arch_mmap_check(addr, len, flags); |