patch-2.1.106 linux/kernel/fork.c
Next file: linux/kernel/kmod.c
Previous file: linux/ipc/shm.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Tue Jun 9 10:37:17 1998
- Orig file:
v2.1.105/linux/kernel/fork.c
- Orig date:
Thu May 7 22:51:55 1998
diff -u --recursive --new-file v2.1.105/linux/kernel/fork.c linux/kernel/fork.c
@@ -204,7 +204,6 @@
int retval;
flush_cache_mm(current->mm);
- down(¤t->mm->mmap_sem);
pprev = &mm->mmap;
for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
struct file *file;
@@ -254,7 +253,6 @@
fail_nomem:
flush_tlb_mm(current->mm);
- up(¤t->mm->mmap_sem);
return retval;
}
@@ -466,6 +464,7 @@
int error = -ENOMEM;
struct task_struct *p;
+ down(¤t->mm->mmap_sem);
lock_kernel();
p = alloc_task_struct();
if (!p)
@@ -570,6 +569,7 @@
++total_forks;
error = p->pid;
bad_fork:
+ up(¤t->mm->mmap_sem);
unlock_kernel();
return error;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov