Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310031
b: refs/heads/master
c: 5a5e4c2
h: refs/heads/master
i:
  310029: 931dd77
  310027: e2eb240
  310023: 16413af
  310015: 782f642
v: v3
  • Loading branch information
Al Viro committed May 31, 2012
1 parent f1f2646 commit 2c20016
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 63d37a84ab6004c235314ffd7a76c5eb28c2fae0
refs/heads/master: 5a5e4c2eca0307deeb438c97dbdc608663515c0a
8 changes: 3 additions & 5 deletions trunk/fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ static unsigned long elf_map(struct file *filep, unsigned long addr,
if (!size)
return addr;

down_write(&current->mm->mmap_sem);
/*
* total_size is the size of the ELF (interpreter) image.
* The _first_ mmap needs to know the full size, otherwise
Expand All @@ -340,13 +339,12 @@ static unsigned long elf_map(struct file *filep, unsigned long addr,
*/
if (total_size) {
total_size = ELF_PAGEALIGN(total_size);
map_addr = do_mmap(filep, addr, total_size, prot, type, off);
map_addr = vm_mmap(filep, addr, total_size, prot, type, off);
if (!BAD_ADDR(map_addr))
do_munmap(current->mm, map_addr+size, total_size-size);
vm_munmap(map_addr+size, total_size-size);
} else
map_addr = do_mmap(filep, addr, size, prot, type, off);
map_addr = vm_mmap(filep, addr, size, prot, type, off);

up_write(&current->mm->mmap_sem);
return(map_addr);
}

Expand Down

0 comments on commit 2c20016

Please sign in to comment.