diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 07:56:23 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-31 03:04:56 +0200 |
commit | 7696e0c37f43187431388df7d8087a099b3e2f1c (patch) | |
tree | 87f9458ce114357021f642241d24a02dc79ea6b6 | |
parent | binfmt_elf: switch elf_map() to vm_mmap/vm_munmap (diff) | |
download | linux-7696e0c37f43187431388df7d8087a099b3e2f1c.tar.xz linux-7696e0c37f43187431388df7d8087a099b3e2f1c.zip |
binfmt_flat: use vm_munmap, we are missing ->mmap_sem there
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/binfmt_flat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 6b2daf99fab8..178cb70acc26 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -562,7 +562,7 @@ static int load_flat_file(struct linux_binprm * bprm, realdatastart = (unsigned long) -ENOMEM; printk("Unable to allocate RAM for process data, errno %d\n", (int)-realdatastart); - do_munmap(current->mm, textpos, text_len); + vm_munmap(textpos, text_len); ret = realdatastart; goto err; } @@ -586,8 +586,8 @@ static int load_flat_file(struct linux_binprm * bprm, } if (IS_ERR_VALUE(result)) { printk("Unable to read data+bss, errno %d\n", (int)-result); - do_munmap(current->mm, textpos, text_len); - do_munmap(current->mm, realdatastart, len); + vm_munmap(textpos, text_len); + vm_munmap(realdatastart, len); ret = result; goto err; } @@ -654,7 +654,7 @@ static int load_flat_file(struct linux_binprm * bprm, } if (IS_ERR_VALUE(result)) { printk("Unable to read code+data+bss, errno %d\n",(int)-result); - do_munmap(current->mm, textpos, text_len + data_len + extra + + vm_munmap(textpos, text_len + data_len + extra + MAX_SHARED_LIBS * sizeof(unsigned long)); ret = result; goto err; |