X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fs390%2Fkernel%2Fcompat_exec.c;h=3e781bd77f71f3fc54f2940b182a9eb75837a783;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=3f43a36e2195cd9463eacbdd494bcd4c5ce90bbc;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9;p=linux-2.6.git diff --git a/arch/s390/kernel/compat_exec.c b/arch/s390/kernel/compat_exec.c index 3f43a36e2..3e781bd77 100644 --- a/arch/s390/kernel/compat_exec.c +++ b/arch/s390/kernel/compat_exec.c @@ -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; }