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.
This commit is contained in:
Alan Cox 2002-04-18 03:55:50 +00:00
parent 91e007dc70
commit ff8f4ebe22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94981

View file

@ -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;