diff options
author | dg <dg@FreeBSD.org> | 1995-07-30 17:49:24 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-07-30 17:49:24 +0000 |
commit | 5d75ddee49b70be14dea24721e28821cbc4d4142 (patch) | |
tree | d7e32e706da23d5db3d192551faa7eeb00104e29 /sys | |
parent | 576802250606e3b925de01f38da29b2235a69f88 (diff) | |
download | FreeBSD-src-5d75ddee49b70be14dea24721e28821cbc4d4142.zip FreeBSD-src-5d75ddee49b70be14dea24721e28821cbc4d4142.tar.gz |
Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL even
when curproc isn't. This condition occurs at system startup and perhaps
at other times.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/trap.c | 6 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 6 | ||||
-rw-r--r-- | sys/kern/subr_trap.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 6d4e426..d581b62 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.56 1995/07/16 10:31:26 joerg Exp $ + * $Id: trap.c,v 1.57 1995/07/16 14:10:55 peter Exp $ */ /* @@ -448,9 +448,9 @@ trap_pfault(frame, usermode) vm_offset_t v; vm_page_t ptepg; - if ((p == NULL) || + if (p == NULL || (!usermode && va < VM_MAXUSER_ADDRESS && - curpcb->pcb_onfault == NULL)) { + (curpcb == NULL || curpcb->pcb_onfault == NULL))) { trap_fatal(frame); return (-1); } diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 6d4e426..d581b62 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.56 1995/07/16 10:31:26 joerg Exp $ + * $Id: trap.c,v 1.57 1995/07/16 14:10:55 peter Exp $ */ /* @@ -448,9 +448,9 @@ trap_pfault(frame, usermode) vm_offset_t v; vm_page_t ptepg; - if ((p == NULL) || + if (p == NULL || (!usermode && va < VM_MAXUSER_ADDRESS && - curpcb->pcb_onfault == NULL)) { + (curpcb == NULL || curpcb->pcb_onfault == NULL))) { trap_fatal(frame); return (-1); } diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 6d4e426..d581b62 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.56 1995/07/16 10:31:26 joerg Exp $ + * $Id: trap.c,v 1.57 1995/07/16 14:10:55 peter Exp $ */ /* @@ -448,9 +448,9 @@ trap_pfault(frame, usermode) vm_offset_t v; vm_page_t ptepg; - if ((p == NULL) || + if (p == NULL || (!usermode && va < VM_MAXUSER_ADDRESS && - curpcb->pcb_onfault == NULL)) { + (curpcb == NULL || curpcb->pcb_onfault == NULL))) { trap_fatal(frame); return (-1); } |