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

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(&current->mm->mmap_sem);
+	/* XXX: maybe this could be down_read ??? - Rik */
+	down_write(&current->mm->mmap_sem);
 
 	vma = find_vma(current->mm, start);
 	error = -EFAULT;
@@ -278,6 +279,6 @@
 		}
 	}
 out:
-	up(&current->mm->mmap_sem);
+	up_write(&current->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)