diff options
author | luoqi <luoqi@FreeBSD.org> | 2000-07-31 14:47:14 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 2000-07-31 14:47:14 +0000 |
commit | c3d52a9a3eba0bbe774ab6244b8b977d18fcd900 (patch) | |
tree | a97e8f98017ce5776fc63e8349707acbfffd7bdc /sys/kern/subr_trap.c | |
parent | b79fdb86f684f885ca011983d3958e06ebafea11 (diff) | |
download | FreeBSD-src-c3d52a9a3eba0bbe774ab6244b8b977d18fcd900.zip FreeBSD-src-c3d52a9a3eba0bbe774ab6244b8b977d18fcd900.tar.gz |
Handle write page faults (both write only or read-modify-write) as MI vm
write-only faults. This would allow write-only mmapped regions to function
correctly.
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 3f87909..5a435fe 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -634,7 +634,7 @@ trap_pfault(frame, usermode, eva) struct proc *p = curproc; if (frame->tf_err & PGEX_W) - ftype = VM_PROT_READ | VM_PROT_WRITE; + ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; @@ -772,7 +772,7 @@ trap_pfault(frame, usermode, eva) } if (frame->tf_err & PGEX_W) - ftype = VM_PROT_READ | VM_PROT_WRITE; + ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; @@ -993,7 +993,7 @@ int trapwrite(addr) /* * fault the data page */ - rv = vm_fault(&vm->vm_map, va, VM_PROT_READ|VM_PROT_WRITE, VM_FAULT_DIRTY); + rv = vm_fault(&vm->vm_map, va, VM_PROT_WRITE, VM_FAULT_DIRTY); --p->p_lock; |