summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-09-29 18:59:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-09-29 18:59:10 +0000
commit48311c2b427b8dae881f3b1370d66138ed2cd37f (patch)
tree53ce7d95624ae95005a6843f334a47a9757b6990 /sys
parent2407bc550a0ae5f1498cb071ce5fdaaac2d0d96a (diff)
When fault indicates PGEX_W, only tell uvm we need a writeable page..
don't request R+W. Issue observed by jsing in a go test of some sort. ok mlarkin
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/i386/trap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c
index 703667af612..1f24e65b09e 100644
--- a/sys/arch/i386/i386/trap.c
+++ b/sys/arch/i386/i386/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.134 2017/09/15 02:33:34 mlarkin Exp $ */
+/* $OpenBSD: trap.c,v 1.135 2017/09/29 18:59:09 deraadt Exp $ */
/* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */
/*-
@@ -130,7 +130,7 @@ trap(struct trapframe *frame)
/* SIGSEGV and SIGBUS need this */
if (frame->tf_err & PGEX_W) {
vftype = PROT_WRITE;
- ftype = PROT_READ | PROT_WRITE;
+ ftype = PROT_WRITE;
} else if (frame->tf_err & PGEX_I) {
ftype = vftype = PROT_EXEC;
} else