aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-04-18 03:55:50 +0000
committerAlan Cox <alc@FreeBSD.org>2002-04-18 03:55:50 +0000
commitff8f4ebe22dc4377e7c31fc9e57dd11406f1c219 (patch)
tree947bac18024b8dd8e7e4620289d6478aa14689e1 /sys/vm/vm_fault.c
parent91e007dc703bfcada8de7d95c1143b22d58bbd7a (diff)
downloadsrc-ff8f4ebe22dc4377e7c31fc9e57dd11406f1c219.tar.gz
src-ff8f4ebe22dc4377e7c31fc9e57dd11406f1c219.zip
Add a comment documenting a race condition in vm_fault(): Specifically, a
modification is made to the vm_map while only a read lock is held.
Notes
Notes: svn path=/head/; revision=94981
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 2d463500554b..bdac6b840dd7 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -258,6 +258,9 @@ RetryFault:;
* If we don't COW now, on a user wire, the user will never
* be able to write to the mapping. If we don't make this
* restriction, the bookkeeping would be nearly impossible.
+ *
+ * XXX The following assignment modifies the map without
+ * holding a write lock on it.
*/
if ((fs.entry->protection & VM_PROT_WRITE) == 0)
fs.entry->max_protection &= ~VM_PROT_WRITE;