This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / x86_64 / ia32 / ia32_binfmt.c
index 92817f1..d810489 100644 (file)
@@ -349,6 +349,8 @@ int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
                return -ENOMEM;
        }
 
+       memset(mpnt, 0, sizeof(*mpnt));
+
        down_write(&mm->mmap_sem);
        {
                mpnt->vm_mm = mm;
@@ -362,11 +364,6 @@ int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
                        mpnt->vm_flags = vm_stack_flags32;
                mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ? 
                        PAGE_COPY_EXEC : PAGE_COPY;
-               mpnt->vm_ops = NULL;
-               mpnt->vm_pgoff = 0;
-               mpnt->vm_file = NULL;
-               INIT_LIST_HEAD(&mpnt->shared);
-               mpnt->vm_private_data = (void *) 0;
                insert_vm_struct(mm, mpnt);
                mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
        } 
@@ -375,7 +372,7 @@ int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
                struct page *page = bprm->page[i];
                if (page) {
                        bprm->page[i] = NULL;
-                       put_dirty_page(current,page,stack_base,mpnt->vm_page_prot);
+                       install_arg_page(mpnt, page, stack_base);
                }
                stack_base += PAGE_SIZE;
        }
@@ -385,7 +382,7 @@ int setup_arg_pages(struct linux_binprm *bprm, int executable_stack)
 }
 
 static unsigned long
-elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type)
+elf32_map (struct file *filep, unsigned long addr, struct elf_phdr *eppnt, int prot, int type, unsigned long unused)
 {
        unsigned long map_addr;
        struct task_struct *me = current;