This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / s390 / kernel / compat_exec.c
index 162deb2..595c43a 100644 (file)
@@ -34,9 +34,6 @@
 #endif
 
 
-#undef STACK_TOP
-#define STACK_TOP TASK31_SIZE
-
 int setup_arg_pages32(struct linux_binprm *bprm, int executable_stack)
 {
        unsigned long stack_base;
@@ -61,6 +58,8 @@ int setup_arg_pages32(struct linux_binprm *bprm, int executable_stack)
                return -ENOMEM;
        }
 
+       memset(mpnt, 0, sizeof(*mpnt));
+
        down_write(&mm->mmap_sem);
        {
                mpnt->vm_mm = mm;
@@ -69,11 +68,6 @@ int setup_arg_pages32(struct linux_binprm *bprm, int executable_stack)
                /* executable stack setting would be applied here */
                mpnt->vm_page_prot = PAGE_COPY;
                mpnt->vm_flags = VM_STACK_FLAGS;
-               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;
        } 
@@ -82,7 +76,7 @@ int setup_arg_pages32(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,PAGE_COPY);
+                       install_arg_page(mpnt, page, stack_base);
                }
                stack_base += PAGE_SIZE;
        }