svn commit: r329705 - stable/11/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Wed Feb 21 11:28:06 UTC 2018
Author: kib
Date: Wed Feb 21 11:28:05 2018
New Revision: 329705
URL: https://svnweb.freebsd.org/changeset/base/329705
Log:
MFC r329254:
Ensure memory consistency on COW.
Modified:
stable/11/sys/vm/vm_fault.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/vm/vm_fault.c
==============================================================================
--- stable/11/sys/vm/vm_fault.c Wed Feb 21 11:26:59 2018 (r329704)
+++ stable/11/sys/vm/vm_fault.c Wed Feb 21 11:28:05 2018 (r329705)
@@ -1133,6 +1133,10 @@ readrest:
*/
pmap_copy_page(fs.m, fs.first_m);
fs.first_m->valid = VM_PAGE_BITS_ALL;
+ if ((fault_flags & VM_FAULT_WIRE) == 0) {
+ prot &= ~VM_PROT_WRITE;
+ fault_type &= ~VM_PROT_WRITE;
+ }
if (wired && (fault_flags &
VM_FAULT_WIRE) == 0) {
vm_page_lock(fs.first_m);
More information about the svn-src-stable
mailing list