mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org, Kirill Korotaev <kirillx@7ka.mipt.ru>
Subject: [PATCH] fix load_elf_binary error path on unshare_files error
Date: Thu, 8 Apr 2004 16:48:51 -0700	[thread overview]
Message-ID: <20040408164851.K22989@build.pdx.osdl.net> (raw)

Make sure to return proper retval on unshare_files() error in
load_elf_binary.  Patch against 2.4.26-rc2.

Error noted by Kirill Korotaev <kirillx@7ka.mipt.ru>.

===== fs/binfmt_elf.c 1.28 vs edited =====
--- 1.28/fs/binfmt_elf.c	Thu Jan 29 15:08:42 2004
+++ edited/fs/binfmt_elf.c	Thu Apr  8 15:12:15 2004
@@ -479,7 +479,8 @@
 		goto out_free_ph;
 		
 	files = current->files;		/* Refcounted so ok */
-	if(unshare_files() < 0)
+	retval = unshare_files();
+	if (retval < 0)
 		goto out_free_ph;
 	if (files == current->files) {
 		put_files_struct(files);

             reply	other threads:[~2004-04-08 23:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-08 23:48 Chris Wright [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-04-08 23:11 Chris Wright

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=20040408164851.K22989@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=kirillx@7ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.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®