flat: fix unmap len in load error path
The data chunk is mmaped with 'len' which remains unchanged, so use that when unmapping in the error path rather than trying to recalculate (and incorrectly so) the value used originally. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: David McCullough <davidm@snapgear.com> Acked-by: Greg Ungerer <gerg@uclinux.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Michal Simek <monstr@monstr.eu> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2e94de8acb
commit
1da083c9b2
1 changed files with 1 additions and 1 deletions
|
@ -596,7 +596,7 @@ 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, data_len + extra);
|
||||
do_munmap(current->mm, realdatastart, len);
|
||||
ret = result;
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue