Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha In PMAP_ISACTIVE(), check curproc->p_vm...



details:   https://anonhg.NetBSD.org/src/rev/d55c5635e7cb
branches:  trunk
changeset: 473384:d55c5635e7cb
user:      ross <ross%NetBSD.org@localhost>
date:      Mon May 31 20:49:00 1999 +0000

description:
In PMAP_ISACTIVE(), check curproc->p_vmspace before using it; this macro
is called early in startup, long before p_vmspace is set to &vmspace0.

diffstat:

 sys/arch/alpha/alpha/pmap.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b37b70622d31 -r d55c5635e7cb sys/arch/alpha/alpha/pmap.c
--- a/sys/arch/alpha/alpha/pmap.c       Mon May 31 20:42:15 1999 +0000
+++ b/sys/arch/alpha/alpha/pmap.c       Mon May 31 20:49:00 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.101 1999/05/25 20:32:29 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.102 1999/05/31 20:49:00 ross Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.101 1999/05/25 20:32:29 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.102 1999/05/31 20:49:00 ross Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -534,7 +534,7 @@
 ({                                                                     \
        int isactive_ = PMAP_ISACTIVE_TEST(pm);                         \
                                                                        \
-       if (curproc != NULL &&                                          \
+       if (curproc != NULL && curproc->p_vmspace != NULL &&            \
           (isactive_ ^ ((pm) == curproc->p_vmspace->vm_map.pmap)))     \
                panic("PMAP_ISACTIVE");                                 \
        (isactive_);                                                    \



Home | Main Index | Thread Index | Old Index