From: Greg Ungerer <gerg@snapgear.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dev@uclinux.org, David Howells <dhowells@redhat.com>,
David McCullough <davidm@snapgear.com>,
Greg Ungerer <gerg@uclinux.org>, Paul Mundt <lethal@linux-sh.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] FLAT: fix unmap len in load error path
Date: Fri, 28 May 2010 16:47:57 +1000 [thread overview]
Message-ID: <4BFF671D.4000509@snapgear.com> (raw)
In-Reply-To: <1274863421-14052-1-git-send-email-vapier@gentoo.org>
Mike Frysinger wrote:
> 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: Greg Ungerer <gerg@uclinux.org>
> ---
> fs/binfmt_flat.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
> index 4959a0a..f7a4059 100644
> --- a/fs/binfmt_flat.c
> +++ b/fs/binfmt_flat.c
> @@ -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;
> }
--
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
next prev parent reply other threads:[~2010-05-28 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 8:43 [PATCH] FLAT: fix unmap len in load error path Mike Frysinger
2010-05-28 6:26 ` David McCullough
2010-05-28 6:47 ` Greg Ungerer [this message]
2010-06-01 9:50 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BFF671D.4000509@snapgear.com \
--to=gerg@snapgear.com \
--cc=akpm@linux-foundation.org \
--cc=davidm@snapgear.com \
--cc=dhowells@redhat.com \
--cc=gerg@uclinux.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=uclinux-dev@uclinux.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox