diff options
author | 1999-01-09 02:01:10 +0000 | |
---|---|---|
committer | 1999-01-09 02:01:10 +0000 | |
commit | 5570072931324a1fe61931a8e331a69efed10529 (patch) | |
tree | 1f9ef718537c58d3b4361f85c35b2af6fc58fbf9 | |
parent | Removed all OPSYS conditionals and extraneous comments for readability. (diff) | |
download | wireguard-openbsd-5570072931324a1fe61931a8e331a69efed10529.tar.xz wireguard-openbsd-5570072931324a1fe61931a8e331a69efed10529.zip |
Fix to a VM cache trash bug by Chuck Cranor
-rw-r--r-- | sys/vm/vm_map.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 8c83bd3e377..f606ca0cd4b 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_map.c,v 1.15 1998/04/25 20:15:13 niklas Exp $ */ +/* $OpenBSD: vm_map.c,v 1.16 1999/01/09 02:01:10 niklas Exp $ */ /* $NetBSD: vm_map.c,v 1.23 1996/02/10 00:08:08 christos Exp $ */ /* @@ -1529,12 +1529,10 @@ vm_map_clean(map, start, end, syncio, invalidate) vm_object_lock(object); } /* - * Flush pages if writing is allowed. * XXX should we continue on an error? */ - if ((current->protection & VM_PROT_WRITE) && - !vm_object_page_clean(object, offset, offset+size, - syncio, FALSE)) { + if (!vm_object_page_clean(object, offset, offset+size, syncio, + FALSE)) { vm_object_unlock(object); vm_map_unlock_read(map); return(KERN_FAILURE); |