Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74642
b: refs/heads/master
c: 8869477
h: refs/heads/master
v: v3
  • Loading branch information
Eric Paris authored and James Morris committed Dec 5, 2007
1 parent 80b50c4 commit 462aa34
Show file tree
Hide file tree
Showing 2 changed files with 7 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: ab5a91a8364c3d6fc617abc47cc81d162c01d90a
refs/heads/master: 8869477a49c3e99def1fcdadd6bbc407fea14b45
8 changes: 6 additions & 2 deletions trunk/mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1615,15 +1615,19 @@ static inline int expand_downwards(struct vm_area_struct *vma,
*/
if (unlikely(anon_vma_prepare(vma)))
return -ENOMEM;

address &= PAGE_MASK;
error = security_file_mmap(0, 0, 0, 0, address, 1);
if (error)
return error;

anon_vma_lock(vma);

/*
* 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.
*/
address &= PAGE_MASK;
error = 0;

/* Somebody else might have raced and expanded it already */
if (address < vma->vm_start) {
Expand Down

0 comments on commit 462aa34

Please sign in to comment.