diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-08-05 20:56:25 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 2004-08-05 20:56:25 +0000 |
commit | 193a1bd0aee27dc786bd14720d00d88ea77bfca5 (patch) | |
tree | 75ce4526bab27a04fb23d3ea0178394d9d781d93 | |
parent | a325e1b07bf6f3f3555df360bcd18ec3428d0bf0 (diff) |
When probing using badaddr make sure the probe load instruction
is retired before turning off trap handling. Otherwise a panic
trap may be taken.
OK drahn@
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 63c627e3d93..9ec131f8e95 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.63 2004/06/24 22:35:56 drahn Exp $ */ +/* $OpenBSD: trap.c,v 1.64 2004/08/05 20:56:24 pefo Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -718,6 +718,8 @@ badaddr(char *addr, u_int32_t len) v = *((volatile u_int8_t *)addr); break; } + /* Make sure all loads retire before turning off fault handling!! */ + __asm__ volatile ("sync"); curpcb->pcb_onfault = oldh; return(0); } |