This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / ia64 / ia32 / binfmt_elf32.c
index 679e68a..30f2b84 100644 (file)
@@ -73,15 +73,13 @@ ia64_elf32_init (struct pt_regs *regs)
         */
        vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
        if (vma) {
+               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_GDT_OFFSET;
                vma->vm_end = vma->vm_start + PAGE_SIZE;
                vma->vm_page_prot = PAGE_SHARED;
-               vma->vm_flags = VM_READ|VM_MAYREAD;
+               vma->vm_flags = VM_READ|VM_MAYREAD|VM_RESERVED;
                vma->vm_ops = &ia32_shared_page_vm_ops;
-               vma->vm_pgoff = 0;
-               vma->vm_file = NULL;
-               vma->vm_private_data = NULL;
                down_write(&current->mm->mmap_sem);
                {
                        insert_vm_struct(current->mm, vma);
@@ -95,15 +93,12 @@ ia64_elf32_init (struct pt_regs *regs)
         */
        vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
        if (vma) {
+               memset(vma, 0, sizeof(*vma));
                vma->vm_mm = current->mm;
                vma->vm_start = IA32_LDT_OFFSET;
                vma->vm_end = vma->vm_start + PAGE_ALIGN(IA32_LDT_ENTRIES*IA32_LDT_ENTRY_SIZE);
                vma->vm_page_prot = PAGE_SHARED;
                vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE;
-               vma->vm_ops = NULL;
-               vma->vm_pgoff = 0;
-               vma->vm_file = NULL;
-               vma->vm_private_data = NULL;
                down_write(&current->mm->mmap_sem);
                {
                        insert_vm_struct(current->mm, vma);
@@ -173,6 +168,8 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
                return -ENOMEM;
        }
 
+       memset(mpnt, 0, sizeof(*mpnt));
+
        down_write(&current->mm->mmap_sem);
        {
                mpnt->vm_mm = current->mm;
@@ -186,10 +183,6 @@ ia32_setup_arg_pages (struct linux_binprm *bprm, int executable_stack)
                        mpnt->vm_flags = VM_STACK_FLAGS;
                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;
-               mpnt->vm_private_data = 0;
                insert_vm_struct(current->mm, mpnt);
                current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
        }
@@ -198,7 +191,7 @@ ia32_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;
        }
@@ -218,7 +211,7 @@ elf32_set_personality (void)
 }
 
 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 pgoff = (eppnt->p_vaddr) & ~IA32_PAGE_MASK;