Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11343
b: refs/heads/master
c: 7ee7823
h: refs/heads/master
i:
  11341: 9f71249
  11339: 150942f
  11335: e76d7ab
  11327: 2324417
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 30, 2005
1 parent 1bd466a commit 313807d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: fd3e42fcc888a773572282575d2fdbf5cfd6216e
refs/heads/master: 7ee78232501ea9de2b6c8f10d32c9a0fee541357
9 changes: 4 additions & 5 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)

down_write(&oldmm->mmap_sem);
flush_cache_mm(oldmm);
down_write(&mm->mmap_sem);

mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
Expand Down Expand Up @@ -251,10 +253,7 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
}

/*
* Link in the new vma and copy the page table entries:
* link in first so that swapoff can see swap entries.
* Note that, exceptionally, here the vma is inserted
* without holding mm->mmap_sem.
* Link in the new vma and copy the page table entries.
*/
spin_lock(&mm->page_table_lock);
*pprev = tmp;
Expand All @@ -275,8 +274,8 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
goto out;
}
retval = 0;

out:
up_write(&mm->mmap_sem);
flush_tlb_mm(oldmm);
up_write(&oldmm->mmap_sem);
return retval;
Expand Down

0 comments on commit 313807d

Please sign in to comment.