diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1999-04-22 06:08:07 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1999-04-22 06:08:07 +0000 |
commit | 2ef62ddf16ef89ace0e3612f98a1ec9ebd87bf4f (patch) | |
tree | 88351644eb3fa9ca9ee6757e2b4ec98dc706f3b8 /sys/arch/powerpc | |
parent | dea2888fe2d13138cc9ffd11b676b7b7a34a0ae6 (diff) |
Bug fixes from NetBSD, port-powerpc/7240 and port-powerpc/7243
The first fixes a major problem seen _too_ many times to record.
If a task that is busy doing disk io is interrupted with a ^C,
its would frequently put the system into a mode where it would
very shortly crash, It was known that it was a signal delivery
that was occurring incorrectly, but had not been diagnosed where.
It is no longer possible to crash the machine on whim.
(This probably should be recorded as a stability patch for 25).
The second was not a bug that had ever been seen to be identified,
but looking at the code it was obvious that the onfault variable was not
being reset before the function exit. The code differs between NetBSD
and OpenBSD somewhat, however only two instances of the code was
reported, and three instances exist in the OpenBSD code. (all were fixed).
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index c524e16499f..cdb1886a06f 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.13 1999/03/13 01:49:07 rahnds Exp $ */ +/* $OpenBSD: trap.c,v 1.14 1999/04/22 06:08:06 rahnds Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -133,7 +133,7 @@ trap(frame) ftype = VM_PROT_READ; if (vm_fault(map, trunc_page(va), ftype, FALSE) == KERN_SUCCESS) - break; + return; if (fb = p->p_addr->u_pcb.pcb_onfault) { p->p_addr->u_pcb.pcb_onfault = 0; frame->srr0 = fb->pc; /* PC */ @@ -465,8 +465,10 @@ badaddr(addr, len) faultbuf env; u_int32_t v; - if (setfault(env)) + if (setfault(env)) { + curpcb->pcb_onfault = 0; return EACCES; + } switch(len) { case 4: v = *((volatile u_int32_t *)addr); @@ -492,8 +494,10 @@ copyin(udaddr, kaddr, len) size_t l; faultbuf env; - if (setfault(env)) + if (setfault(env)) { + curpcb->pcb_onfault = 0; return EACCES; + } while (len > 0) { p = USER_ADDR + ((u_int)udaddr & ~SEGMENT_MASK); l = (USER_ADDR + SEGMENT_LENGTH) - p; @@ -520,6 +524,7 @@ copyout(kaddr, udaddr, len) faultbuf env; if (setfault(env)) { + curpcb->pcb_onfault = 0; return EACCES; } while (len > 0) { |