patch-2.4.3 linux/arch/ia64/mm/fault.c

Next file: linux/arch/ia64/sn/io/l1.c
Previous file: linux/arch/ia64/lib/strlen_user.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/arch/ia64/mm/fault.c linux/arch/ia64/mm/fault.c
@@ -60,7 +60,7 @@
 	if (in_interrupt() || !mm)
 		goto no_context;
 
-	down(&mm->mmap_sem);
+	down_read(&mm->mmap_sem);
 
 	vma = find_vma_prev(mm, address, &prev_vma);
 	if (!vma)
@@ -112,7 +112,7 @@
 	      default:
 		goto out_of_memory;
 	}
-	up(&mm->mmap_sem);
+	up_read(&mm->mmap_sem);
 	return;
 
   check_expansion:
@@ -135,7 +135,7 @@
 	goto good_area;
 
   bad_area:
-	up(&mm->mmap_sem);
+	up_read(&mm->mmap_sem);
 	if (isr & IA64_ISR_SP) {
 		/*
 		 * This fault was due to a speculative load set the "ed" bit in the psr to
@@ -185,7 +185,7 @@
 	return;
 
   out_of_memory:
-	up(&mm->mmap_sem);
+	up_read(&mm->mmap_sem);
 	printk("VM: killing process %s\n", current->comm);
 	if (user_mode(regs))
 		do_exit(SIGKILL);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)