--- /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