From: David McCullough <david_mccullough@mcafee.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dev@uclinux.org, David Howells <dhowells@redhat.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:26:32 +1000 [thread overview]
Message-ID: <20100528062632.GC20365@mcafee.com> (raw)
In-Reply-To: <1274863421-14052-1-git-send-email-vapier@gentoo.org>
Jivin Mike Frysinger lays it down ...
> 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 <david_mccullough@mcafee.com>
Cheers,
Davidm
> ---
> 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;
> }
> --
> 1.7.1
>
>
>
--
David McCullough, david_mccullough@mcafee.com, Ph:+61 734352815
McAfee - SnapGear http://www.mcafee.com http://www.uCdot.org
next prev parent reply other threads:[~2010-05-28 6:26 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 [this message]
2010-05-28 6:47 ` Greg Ungerer
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=20100528062632.GC20365@mcafee.com \
--to=david_mccullough@mcafee.com \
--cc=akpm@linux-foundation.org \
--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