summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2001-09-20 13:02:30 +0000
committerdrahn <drahn@openbsd.org>2001-09-20 13:02:30 +0000
commit6445615f45c5ece383cb7eda36f08aa045291ffe (patch)
tree8999903126939f55c1588d5812f046aee43ab44c
parentBe much more careful about pcb_onfault. (diff)
downloadwireguard-openbsd-6445615f45c5ece383cb7eda36f08aa045291ffe.tar.xz
wireguard-openbsd-6445615f45c5ece383cb7eda36f08aa045291ffe.zip
On a fault the onfault condition should be set to the old handler, not
cleared. This code restored the old handler on normal completion but not on fault.
-rw-r--r--sys/arch/macppc/macppc/machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 81e86fa3c1f..bfd934755a8 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.7 2001/09/19 20:50:57 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.8 2001/09/20 13:02:30 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1465,7 +1465,7 @@ kcopy(from, to, size)
register void *oldh = curproc->p_addr->u_pcb.pcb_onfault;
if (setfault(env)) {
- curpcb->pcb_onfault = 0;
+ curproc->p_addr->u_pcb.pcb_onfault = oldh;
return EFAULT;
}
bcopy(from, to, size);