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

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)