From: Evgeny Polyakov <johnpol@2ka.mipt.ru>
To: linux-kernel@vger.kernel.org
Subject: [very very small patch] that concerns ./fs/binfmt_elf.c and fix one of XXX
Date: Wed, 22 Aug 2001 03:52:58 +0400 [thread overview]
Message-ID: <200108212311.f7LNBwl18820@www.2ka.mipt.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
Helo, linux guru.
This is a very small and first patch against 2.4.9 kernel.
I think anyone can do this, but forgot.
It was made after looking into binfmt_aaout.c and comparison with
binfmt_elf.c
And while the graetest guru are speaking about great, complex and
particularily needed tasks, small beginers are ( and i suppose lamers( and
i
hope not for a long time)) trying to fix small problems :))
Here it:
---
WBR. //s0mbre
[-- Attachment #2: binfmt_elf.patch --]
[-- Type: text/plain, Size: 895 bytes --]
--- /tmp/linux/fs/binfmt_elf.c Sat Jul 21 23:42:25 2001
+++ ./fs/binfmt_elf.c Wed Aug 22 01:44:28 2001
@@ -413,7 +413,7 @@
struct elfhdr interp_elf_ex;
struct exec interp_ex;
char passed_fileno[6];
-
+
/* Get the exec-header */
elf_ex = *((struct elfhdr *) bprm->buf);
@@ -592,9 +592,14 @@
/* 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) {
+ /* Someone check-me: is this error path enough? */
+ 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
the correct location in memory. At this point, we assume that
the image should be loaded at fixed address, not at a variable
reply other threads:[~2001-08-21 23:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200108212311.f7LNBwl18820@www.2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).