2 fs/exec.c | 16 +++++-----------
3 1 file changed, 5 insertions(+), 11 deletions(-)
5 --- linux-2.6-lcpt.orig/fs/exec.c
6 +++ linux-2.6-lcpt/fs/exec.c
7 @@ -240,13 +240,13 @@ static void flush_arg_page(struct linux_
9 static int __bprm_mm_init(struct linux_binprm *bprm)
13 struct vm_area_struct *vma = NULL;
14 struct mm_struct *mm = bprm->mm;
16 bprm->vma = vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
21 down_write(&mm->mmap_sem);
23 @@ -265,7 +265,9 @@ static int __bprm_mm_init(struct linux_b
24 err = insert_vm_struct(mm, vma);
26 up_write(&mm->mmap_sem);
28 + kmem_cache_free(vm_area_cachep, vma);
33 mm->stack_vm = mm->total_vm = 1;
34 @@ -274,14 +276,6 @@ static int __bprm_mm_init(struct linux_b
35 bprm->p = vma->vm_end - sizeof(void *);
42 - kmem_cache_free(vm_area_cachep, vma);
48 static bool valid_arg_len(struct linux_binprm *bprm, long len)