patch-1.3.71 linux/fs/binfmt_elf.c
Next file: linux/fs/binfmt_script.c
Previous file: linux/fs/binfmt_aout.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sat Mar 2 20:29:23 1996
- Orig file:
v1.3.70/linux/fs/binfmt_elf.c
- Orig date:
Fri Feb 9 17:53:05 1996
diff -u --recursive --new-file v1.3.70/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -94,22 +94,7 @@
{
unsigned long *argv,*envp, *dlinfo;
unsigned long * sp;
- struct vm_area_struct *mpnt;
- mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
- if (mpnt) {
- mpnt->vm_mm = current->mm;
- mpnt->vm_start = PAGE_MASK & (unsigned long) p;
- mpnt->vm_end = TASK_SIZE;
- mpnt->vm_page_prot = PAGE_COPY;
- mpnt->vm_flags = VM_STACK_FLAGS;
- mpnt->vm_pte = 0;
- mpnt->vm_inode = NULL;
- mpnt->vm_offset = 0;
- mpnt->vm_ops = NULL;
- insert_vm_struct(current, mpnt);
- current->mm->total_vm += (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
sp = (unsigned long *) (0xfffffffc & (unsigned long) p);
sp -= exec ? DLINFO_ITEMS*2 : 2;
dlinfo = sp;
@@ -537,7 +522,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(0, bprm->page);
+ bprm->p = setup_arg_pages(bprm->p, bprm);
current->mm->start_stack = bprm->p;
/* Now we do a little grungy work by mmaping the ELF image into
@@ -639,7 +624,6 @@
#endif
current->suid = current->euid = current->fsuid = bprm->e_uid;
current->sgid = current->egid = current->fsgid = bprm->e_gid;
- bprm->p -= MAX_ARG_PAGES*PAGE_SIZE;
bprm->p = (unsigned long)
create_elf_tables((char *)bprm->p,
bprm->argc,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this