diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 01:49:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 21:04:55 -0400 |
commit | 5a5e4c2eca0307deeb438c97dbdc608663515c0a (patch) | |
tree | 324a5204b4fb315b5a7f9dda0739b6524e93a55b /fs/binfmt_elf.c | |
parent | 63d37a84ab6004c235314ffd7a76c5eb28c2fae0 (diff) | |
download | kernel_goldelico_gta04-5a5e4c2eca0307deeb438c97dbdc608663515c0a.zip kernel_goldelico_gta04-5a5e4c2eca0307deeb438c97dbdc608663515c0a.tar.gz kernel_goldelico_gta04-5a5e4c2eca0307deeb438c97dbdc608663515c0a.tar.bz2 |
binfmt_elf: switch elf_map() to vm_mmap/vm_munmap
No reason to hold ->mmap_sem over the sequence
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e658dd1..1b52956 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -329,7 +329,6 @@ static unsigned long elf_map(struct file *filep, unsigned long addr, if (!size) return addr; - down_write(¤t->mm->mmap_sem); /* * total_size is the size of the ELF (interpreter) image. * The _first_ mmap needs to know the full size, otherwise @@ -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(¤t->mm->mmap_sem); return(map_addr); } |