patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / s390 / kernel / compat_exec.c
index 3f43a36..3e781bd 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, grow;
@@ -64,6 +61,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;
@@ -72,11 +71,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;
                vx_vmpages_sub(mm, mm->total_vm -
@@ -87,7 +81,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;
        }