Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97788
b: refs/heads/master
c: a5b4592
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Kosina authored and Linus Torvalds committed Jun 6, 2008
1 parent e5d112f commit 87d9d08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 33dda515a1995dfb3b6b57d7ace9b3ee9d449c11
refs/heads/master: a5b4592cf77b973c29e7c9695873a26052b58951
8 changes: 7 additions & 1 deletion trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,16 @@ asmlinkage unsigned long sys_brk(unsigned long brk)
unsigned long rlim, retval;
unsigned long newbrk, oldbrk;
struct mm_struct *mm = current->mm;
unsigned long min_brk;

down_write(&mm->mmap_sem);

if (brk < mm->start_brk)
#ifdef CONFIG_COMPAT_BRK
min_brk = mm->end_code;
#else
min_brk = mm->start_brk;
#endif
if (brk < min_brk)
goto out;

/*
Expand Down

0 comments on commit 87d9d08

Please sign in to comment.