patch-2.0.34 linux/kernel/fork.c
Next file: linux/kernel/ksyms.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Wed Jun 3 15:17:50 1998
- Orig file:
v2.0.33/linux/kernel/fork.c
- Orig date:
Tue Mar 10 13:19:09 1998
diff -u --recursive --new-file v2.0.33/linux/kernel/fork.c linux/kernel/fork.c
@@ -136,7 +136,9 @@
exit_mmap(mm);
goto free_mm;
}
+ down(&mm->mmap_sem);
if (dup_mmap(mm)) {
+ up(&mm->mmap_sem);
tsk->mm = NULL;
exit_mmap(mm);
free_page_tables(mm);
@@ -144,6 +146,7 @@
kfree(mm);
return -ENOMEM;
}
+ up(&mm->mmap_sem);
return 0;
}
SET_PAGE_DIR(tsk, current->mm->pgd);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov