patch-2.1.92 linux/ipc/shm.c
Next file: linux/kernel/exit.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index
-  Lines: 15
-  Date:
Mon Mar 30 00:21:41 1998
-  Orig file: 
v2.1.91/linux/ipc/shm.c
-  Orig date: 
Tue Mar 10 10:03:35 1998
diff -u --recursive --new-file v2.1.91/linux/ipc/shm.c linux/ipc/shm.c
@@ -632,12 +632,14 @@
 {
 	struct vm_area_struct *shmd, *shmdnext;
 
+	lock_kernel();
 	for (shmd = current->mm->mmap; shmd; shmd = shmdnext) {
 		shmdnext = shmd->vm_next;
 		if (shmd->vm_ops == &shm_vm_ops
 		    && shmd->vm_start - shmd->vm_offset == (ulong) shmaddr)
 			do_munmap(shmd->vm_start, shmd->vm_end - shmd->vm_start);
 	}
+	unlock_kernel();
 	return 0;
 }
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov