diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-08-09 12:12:52 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-08-09 12:12:52 +0200 |
| commit | d0ed4c60abfb9a4ab6cd416d1dea9df6266f8fc7 (patch) | |
| tree | 8fd3af1a9e788333e85d2a51a4fc2a9858a9a95a /fs/exec.c | |
| parent | 72a361a5b91c77b33ab2533674fdcec4de3278d0 (diff) | |
| parent | aba941392aeef2d1bc064a1e4b09293473ef7b9b (diff) | |
Merge branch 'acpi-scan' to satisfy dependencies.
Diffstat (limited to 'fs/exec.c')
| -rw-r--r-- | fs/exec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c index 2d4e0075bd24..bdd0eacefdf5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -290,15 +290,15 @@ static int __bprm_mm_init(struct linux_binprm *bprm) struct vm_area_struct *vma = NULL; struct mm_struct *mm = bprm->mm; - bprm->vma = vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); + bprm->vma = vma = vm_area_alloc(mm); if (!vma) return -ENOMEM; + vma_set_anonymous(vma); if (down_write_killable(&mm->mmap_sem)) { err = -EINTR; goto err_free; } - vma->vm_mm = mm; /* * Place the stack at the largest stack address the architecture @@ -311,7 +311,6 @@ static int __bprm_mm_init(struct linux_binprm *bprm) vma->vm_start = vma->vm_end - PAGE_SIZE; vma->vm_flags = VM_SOFTDIRTY | VM_STACK_FLAGS | VM_STACK_INCOMPLETE_SETUP; vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); - INIT_LIST_HEAD(&vma->anon_vma_chain); err = insert_vm_struct(mm, vma); if (err) @@ -326,7 +325,7 @@ err: up_write(&mm->mmap_sem); err_free: bprm->vma = NULL; - kmem_cache_free(vm_area_cachep, vma); + vm_area_free(vma); return err; } |
