patch-2.1.92 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

diff -u --recursive --new-file v2.1.91/linux/kernel/fork.c linux/kernel/fork.c
@@ -208,6 +208,7 @@
 	int retval;
 
 	flush_cache_mm(current->mm);
+	down(&current->mm->mmap_sem);
 	pprev = &mm->mmap;
 	for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
 		struct file *file;
@@ -257,6 +258,7 @@
 
 fail_nomem:
 	flush_tlb_mm(current->mm);
+	up(&current->mm->mmap_sem);
 	return retval;
 }
 
@@ -514,6 +516,7 @@
 		/* ?? should we just memset this ?? */
 		for(i = 0; i < smp_num_cpus; i++)
 			p->per_cpu_utime[i] = p->per_cpu_stime[i] = 0;
+		spin_lock_init(&p->sigmask_lock);
 	}
 #endif
 	p->lock_depth = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov