From 929b9d10d6a5da3e3a9c3a28a54058cb5e8aee27 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sun, 20 Jul 1997 07:03:41 +0000 Subject: protect against NULL curproc derefs. Enables MMU hits inside interupt contexts, i.e. IDE works much better now (still some problems though) --- sys/arch/alpha/include/pmap.old.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/arch/alpha') diff --git a/sys/arch/alpha/include/pmap.old.h b/sys/arch/alpha/include/pmap.old.h index f70bd18d318..2d765bc70f2 100644 --- a/sys/arch/alpha/include/pmap.old.h +++ b/sys/arch/alpha/include/pmap.old.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.old.h,v 1.2 1997/01/24 19:57:16 niklas Exp $ */ +/* $OpenBSD: pmap.old.h,v 1.3 1997/07/20 07:03:40 niklas Exp $ */ /* $NetBSD: pmap.old.h,v 1.6 1996/11/13 21:13:19 cgd Exp $ */ /* @@ -75,7 +75,8 @@ extern struct pmap kernel_pmap_store; #define pmap_kernel() (&kernel_pmap_store) #define active_pmap(pm) \ - ((pm) == pmap_kernel() || (pm) == curproc->p_vmspace->vm_map.pmap) + ((pm) == pmap_kernel() || \ + (curproc && (pm) == curproc->p_vmspace->vm_map.pmap)) /* * Macros for speed -- cgit v1.2.3