aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 11fe93f7363c..7e36c6f6f538 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -405,12 +405,10 @@ int setup_arg_pages(struct linux_binprm *bprm,
405 bprm->loader += stack_base; 405 bprm->loader += stack_base;
406 bprm->exec += stack_base; 406 bprm->exec += stack_base;
407 407
408 mpnt = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL); 408 mpnt = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
409 if (!mpnt) 409 if (!mpnt)
410 return -ENOMEM; 410 return -ENOMEM;
411 411
412 memset(mpnt, 0, sizeof(*mpnt));
413
414 down_write(&mm->mmap_sem); 412 down_write(&mm->mmap_sem);
415 { 413 {
416 mpnt->vm_mm = mm; 414 mpnt->vm_mm = mm;