patch-2.4.3 linux/mm/mprotect.c
Next file: linux/mm/mremap.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Mon Mar 19 12:35:08 2001
-  Orig file: 
v2.4.2/linux/mm/mprotect.c
-  Orig date: 
Fri Dec 29 14:07:24 2000
diff -u --recursive --new-file v2.4.2/linux/mm/mprotect.c linux/mm/mprotect.c
@@ -242,7 +242,8 @@
 	if (end == start)
 		return 0;
 
-	down(¤t->mm->mmap_sem);
+	/* XXX: maybe this could be down_read ??? - Rik */
+	down_write(¤t->mm->mmap_sem);
 
 	vma = find_vma(current->mm, start);
 	error = -EFAULT;
@@ -278,6 +279,6 @@
 		}
 	}
 out:
-	up(¤t->mm->mmap_sem);
+	up_write(¤t->mm->mmap_sem);
 	return error;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)