patch-2.4.3 linux/arch/i386/kernel/ldt.c
Next file: linux/arch/i386/kernel/pci-pc.c
Previous file: linux/arch/i386/kernel/i387.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Mon Mar 19 12:35:09 2001
-  Orig file: 
v2.4.2/linux/arch/i386/kernel/ldt.c
-  Orig date: 
Fri Dec 29 14:07:20 2000
diff -u --recursive --new-file v2.4.2/linux/arch/i386/kernel/ldt.c linux/arch/i386/kernel/ldt.c
@@ -86,7 +86,7 @@
 	 * the GDT index of the LDT is allocated dynamically, and is
 	 * limited by MAX_LDT_DESCRIPTORS.
 	 */
-	down(&mm->mmap_sem);
+	down_write(&mm->mmap_sem);
 	if (!mm->context.segments) {
 		error = -ENOMEM;
 		mm->context.segments = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
@@ -141,7 +141,7 @@
 	error = 0;
 
 out_unlock:
-	up(&mm->mmap_sem);
+	up_write(&mm->mmap_sem);
 out:
 	return error;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)