From: Russell King <rmk@arm.linux.org.uk>
To: Pavel Machek <pavel@ucw.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
torvalds@transmeta.com,
"Marcelo W. Tosatti" <marcelo@conectiva.com.br>
Subject: Re: execve() fails to report errors
Date: Fri, 15 Mar 2002 13:01:33 +0000 [thread overview]
Message-ID: <20020315130133.A24984@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20020305233437.GA130@elf.ucw.cz>
In-Reply-To: <20020305233437.GA130@elf.ucw.cz>; from pavel@ucw.cz on Wed, Mar 06, 2002 at 12:34:37AM +0100
On Wed, Mar 06, 2002 at 12:34:37AM +0100, Pavel Machek wrote:
> Now, I do not know if this is the right fix (binfmt_elf looks
> spaghetty to me) but its certainly better than it was.
Here's another fix in this area. If setup_arg_pages() fails, we continue
although nothing went wrong. The following patch kills the process
instead.
Linus/Marcelo - please apply.
--- orig/fs/binfmt_elf.c Fri Mar 15 10:14:29 2002
+++ linux/fs/binfmt_elf.c Mon Mar 11 17:29:03 2002
@@ -585,7 +585,12 @@
/* Do this so that we can load the interpreter, if need be. We will
change some of these later */
current->mm->rss = 0;
- setup_arg_pages(bprm); /* XXX: check error */
+ retval = setup_arg_pages(bprm);
+ if (retval < 0) {
+ send_sig(SIGKILL, current, 0);
+ return retval;
+ }
+
current->mm->start_stack = bprm->p;
/* Now we do a little grungy work by mmaping the ELF image into
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
prev parent reply other threads:[~2002-03-15 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-05 23:34 Pavel Machek
2002-03-06 14:08 ` Richard B. Johnson
2002-03-06 15:21 ` Pavel Machek
2002-03-15 13:01 ` Russell King [this message]
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=20020315130133.A24984@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=pavel@ucw.cz \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®