Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57940
b: refs/heads/master
c: 06b32f3
h: refs/heads/master
v: v3
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Jun 21, 2007
1 parent 2279152 commit 03bdacc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: d2f1c0fa2b346769ac35559ae3bafccf151dd446
refs/heads/master: 06b32f3ab6df4c7489729f94bdc7093c72681d4b
9 changes: 7 additions & 2 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,9 +1536,14 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
* vma->vm_start/vm_end cannot change under us because the caller
* is required to hold the mmap_sem in read mode. We need the
* anon_vma lock to serialize against concurrent expand_stacks.
* Also guard against wrapping around to address 0.
*/
address += 4 + PAGE_SIZE - 1;
address &= PAGE_MASK;
if (address < PAGE_ALIGN(address+4))
address = PAGE_ALIGN(address+4);
else {
anon_vma_unlock(vma);
return -ENOMEM;
}
error = 0;

/* Somebody else might have raced and expanded it already */
Expand Down

0 comments on commit 03bdacc

Please sign in to comment.