aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/sysenter.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index c60419dee018..713ba39d32c6 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -148,8 +148,10 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
148 vma->vm_mm = mm; 148 vma->vm_mm = mm;
149 149
150 ret = insert_vm_struct(mm, vma); 150 ret = insert_vm_struct(mm, vma);
151 if (ret) 151 if (unlikely(ret)) {
152 goto free_vma; 152 kmem_cache_free(vm_area_cachep, vma);
153 goto up_fail;
154 }
153 155
154 current->mm->context.vdso = (void *)addr; 156 current->mm->context.vdso = (void *)addr;
155 current_thread_info()->sysenter_return = 157 current_thread_info()->sysenter_return =
@@ -158,10 +160,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
158up_fail: 160up_fail:
159 up_write(&mm->mmap_sem); 161 up_write(&mm->mmap_sem);
160 return ret; 162 return ret;
161
162free_vma:
163 kmem_cache_free(vm_area_cachep, vma);
164 return ret;
165} 163}
166 164
167const char *arch_vma_name(struct vm_area_struct *vma) 165const char *arch_vma_name(struct vm_area_struct *vma)