
From: Chris Wright <chrisw@osdl.org>

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

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


---

 25-akpm/fs/binfmt_elf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/binfmt_elf.c~fix-load_elf_binary-error-path-on-unshare_files-error fs/binfmt_elf.c
--- 25/fs/binfmt_elf.c~fix-load_elf_binary-error-path-on-unshare_files-error	Thu Apr  8 16:30:11 2004
+++ 25-akpm/fs/binfmt_elf.c	Thu Apr  8 16:30:11 2004
@@ -522,7 +522,8 @@ static int load_elf_binary(struct linux_
 		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);

_
