aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index e658dd134b95..1b52956afe33 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,
329 if (!size) 329 if (!size)
330 return addr; 330 return addr;
331 331
332 down_write(&current->mm->mmap_sem);
333 /* 332 /*
334 * total_size is the size of the ELF (interpreter) image. 333 * total_size is the size of the ELF (interpreter) image.
335 * The _first_ mmap needs to know the full size, otherwise 334 * 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,
340 */ 339 */
341 if (total_size) { 340 if (total_size) {
342 total_size = ELF_PAGEALIGN(total_size); 341 total_size = ELF_PAGEALIGN(total_size);
343 map_addr = do_mmap(filep, addr, total_size, prot, type, off); 342 map_addr = vm_mmap(filep, addr, total_size, prot, type, off);
344 if (!BAD_ADDR(map_addr)) 343 if (!BAD_ADDR(map_addr))
345 do_munmap(current->mm, map_addr+size, total_size-size); 344 vm_munmap(map_addr+size, total_size-size);
346 } else 345 } else
347 map_addr = do_mmap(filep, addr, size, prot, type, off); 346 map_addr = vm_mmap(filep, addr, size, prot, type, off);
348 347
349 up_write(&current->mm->mmap_sem);
350 return(map_addr); 348 return(map_addr);
351} 349}
352 350