From cff7b8faa708e0f716c4c4917e00b605fed09477 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 20 Aug 1998 19:46:36 +0000 Subject: avoid double fault during early boot; rvb --- sys/arch/i386/i386/trap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 9444e32f3ef..3e9d4d4be43 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.26 1998/02/22 21:35:28 niklas Exp $ */ +/* $OpenBSD: trap.c,v 1.27 1998/08/20 19:46:35 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ #undef DEBUG @@ -390,6 +390,8 @@ trap(frame) extern vm_map_t kernel_map; unsigned nss, v; + if (vm == NULL) + goto we_re_toast; va = trunc_page((vm_offset_t)rcr2()); /* * It is only a kernel address space fault iff: -- cgit v1.2.3