diff options
author | sos <sos@FreeBSD.org> | 1998-11-23 09:34:19 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1998-11-23 09:34:19 +0000 |
commit | ba9fb96ddbb30995e96142bf949ea174ab702ba0 (patch) | |
tree | 972fafcbaab2596e94127ada4dc8873f104c3d44 /sys/kern/kern_tc.c | |
parent | e3a7f015db577ee58099f8dc8ed658ddd394704d (diff) | |
download | FreeBSD-src-ba9fb96ddbb30995e96142bf949ea174ab702ba0.zip FreeBSD-src-ba9fb96ddbb30995e96142bf949ea174ab702ba0.tar.gz |
Add a kludge to prevent panicing when using VM86 and hitting here
with a NULL curproc.
Originally by: Tor Egge (IIRC)
Diffstat (limited to 'sys/kern/kern_tc.c')
-rw-r--r-- | sys/kern/kern_tc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 00c75ed..c712245 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_clock.c 8.5 (Berkeley) 1/21/94 - * $Id: kern_clock.c,v 1.82 1998/10/25 17:44:50 phk Exp $ + * $Id: kern_clock.c,v 1.83 1998/10/26 06:13:18 bde Exp $ */ #include <sys/param.h> @@ -363,7 +363,7 @@ statclock(frame) struct rusage *ru; struct vmspace *vm; - if (CLKF_USERMODE(frame)) { + if (curproc != NULL && CLKF_USERMODE(frame)) { p = curproc; if (p->p_flag & P_PROFIL) addupc_intr(p, CLKF_PC(frame), 1); |