Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174858
b: refs/heads/master
c: 2c6a101
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Dec 11, 2009
1 parent 02831f0 commit 4c006d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9206de95b1ea68357996ec02be5db0638a0de2c1
refs/heads/master: 2c6a10161d0b5fc047b5bd81b03693b9af99fab5
10 changes: 2 additions & 8 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1985,20 +1985,14 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
if (!len)
return addr;

if ((addr + len) > TASK_SIZE || (addr + len) < addr)
return -EINVAL;

if (is_hugepage_only_range(mm, addr, len))
return -EINVAL;

error = security_file_mmap(NULL, 0, 0, 0, addr, 1);
if (error)
return error;

flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;

error = arch_mmap_check(addr, len, flags);
if (error)
error = get_unmapped_area(NULL, addr, len, 0, MAP_FIXED);
if (error & ~PAGE_MASK)
return error;

/*
Expand Down

0 comments on commit 4c006d3

Please sign in to comment.