diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 01:56:23 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-05-30 21:04:56 -0400 |
commit | 7696e0c37f43187431388df7d8087a099b3e2f1c (patch) | |
tree | 87f9458ce114357021f642241d24a02dc79ea6b6 /fs/binfmt_flat.c | |
parent | 5a5e4c2eca0307deeb438c97dbdc608663515c0a (diff) |
binfmt_flat: use vm_munmap, we are missing ->mmap_sem there
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/binfmt_flat.c')
-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, | |||
562 | realdatastart = (unsigned long) -ENOMEM; | 562 | realdatastart = (unsigned long) -ENOMEM; |
563 | printk("Unable to allocate RAM for process data, errno %d\n", | 563 | printk("Unable to allocate RAM for process data, errno %d\n", |
564 | (int)-realdatastart); | 564 | (int)-realdatastart); |
565 | do_munmap(current->mm, textpos, text_len); | 565 | vm_munmap(textpos, text_len); |
566 | ret = realdatastart; | 566 | ret = realdatastart; |
567 | goto err; | 567 | goto err; |
568 | } | 568 | } |
@@ -586,8 +586,8 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
586 | } | 586 | } |
587 | if (IS_ERR_VALUE(result)) { | 587 | if (IS_ERR_VALUE(result)) { |
588 | printk("Unable to read data+bss, errno %d\n", (int)-result); | 588 | printk("Unable to read data+bss, errno %d\n", (int)-result); |
589 | do_munmap(current->mm, textpos, text_len); | 589 | vm_munmap(textpos, text_len); |
590 | do_munmap(current->mm, realdatastart, len); | 590 | vm_munmap(realdatastart, len); |
591 | ret = result; | 591 | ret = result; |
592 | goto err; | 592 | goto err; |
593 | } | 593 | } |
@@ -654,7 +654,7 @@ static int load_flat_file(struct linux_binprm * bprm, | |||
654 | } | 654 | } |
655 | if (IS_ERR_VALUE(result)) { | 655 | if (IS_ERR_VALUE(result)) { |
656 | printk("Unable to read code+data+bss, errno %d\n",(int)-result); | 656 | printk("Unable to read code+data+bss, errno %d\n",(int)-result); |
657 | do_munmap(current->mm, textpos, text_len + data_len + extra + | 657 | vm_munmap(textpos, text_len + data_len + extra + |
658 | MAX_SHARED_LIBS * sizeof(unsigned long)); | 658 | MAX_SHARED_LIBS * sizeof(unsigned long)); |
659 | ret = result; | 659 | ret = result; |
660 | goto err; | 660 | goto err; |