patch-2.3.5 linux/fs/binfmt_elf.c

Next file: linux/fs/binfmt_em86.c
Previous file: linux/fs/binfmt_aout.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.4/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -573,13 +573,12 @@
 		  passed_p = passed_fileno;
 
 		  if (elf_interpreter) {
-		    bprm->p = copy_strings(1,&passed_p,bprm->page,bprm->p,2);
+		    retval = copy_strings_kernel(1,&passed_p,bprm);
+			if (retval)
+				goto out_free_dentry; 
 		    bprm->argc++;
 		  }
 		}
-		retval = -E2BIG;
-		if (!bprm->p)
-			goto out_free_dentry;
 	}
 
 	/* Flush all traces of the currently running executable */
@@ -601,7 +600,7 @@
 	/* Do this so that we can load the interpreter, if need be.  We will
 	   change some of these later */
 	current->mm->rss = 0;
-	bprm->p = setup_arg_pages(bprm->p, bprm);
+	setup_arg_pages(bprm); /* XXX: check error */
 	current->mm->start_stack = bprm->p;
 
 	/* Try and get dynamic programs out of the way of the default mmap

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)