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

Next file: linux/arch/arm/kernel/entry-armo.S
Previous file: linux/arch/alpha/kernel/sys_wildfire.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/arch/alpha/mm/fault.c linux/arch/alpha/mm/fault.c
@@ -113,7 +113,7 @@
 		goto vmalloc_fault;
 #endif
 
-	down(&mm->mmap_sem);
+	down_read(&mm->mmap_sem);
 	vma = find_vma(mm, address);
 	if (!vma)
 		goto bad_area;
@@ -146,7 +146,7 @@
 	 * the fault.
 	 */
 	fault = handle_mm_fault(mm, vma, address, cause > 0);
-	up(&mm->mmap_sem);
+	up_read(&mm->mmap_sem);
 
 	if (fault < 0)
 		goto out_of_memory;
@@ -160,7 +160,7 @@
  * Fix it, but check if it's kernel or user first..
  */
 bad_area:
-	up(&mm->mmap_sem);
+	up_read(&mm->mmap_sem);
 
 	if (user_mode(regs)) {
 		force_sig(SIGSEGV, current);

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