Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4823
b: refs/heads/master
c: 9fb1759
h: refs/heads/master
i:
  4821: 233dc97
  4819: 0392819
  4815: 08e3027
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed Jul 16, 2005
1 parent 8794594 commit 362bd5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6e1860312cd8c33ad1f17d1af22fb6aa1f2cf83
refs/heads/master: 9fb1759a3102c26cd8f64254a7c3e532782c2bb8
7 changes: 6 additions & 1 deletion trunk/arch/x86_64/ia32/syscall32.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
int npages = (VSYSCALL32_END - VSYSCALL32_BASE) >> PAGE_SHIFT;
struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
int ret;

vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
if (!vma)
Expand All @@ -78,7 +79,11 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
vma->vm_mm = mm;

down_write(&mm->mmap_sem);
insert_vm_struct(mm, vma);
if ((ret = insert_vm_struct(mm, vma))) {
up_write(&mm->mmap_sem);
kmem_cache_free(vm_area_cachep, vma);
return ret;
}
mm->total_vm += npages;
up_write(&mm->mmap_sem);
return 0;
Expand Down

0 comments on commit 362bd5b

Please sign in to comment.