From 75f5be6429f1f61e60630db788a9d966b4697d8a Mon Sep 17 00:00:00 2001 From: mickey Date: Tue, 7 May 1996 15:27:51 +0000 Subject: [PATCH] from NetBSD PR#2124(port-i386): Juergen Hannken-Illjes: core dump after panic does not work. fill curproc w/ some reasonable (struct proc *) pointer. --- sys/arch/i386/i386/machdep.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 4cadab7b1b5..bdcd1bcb5bb 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.16 1996/05/07 07:21:46 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.17 1996/05/07 15:27:51 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.200 1996/05/03 19:42:15 christos Exp $ */ /*- @@ -734,6 +734,12 @@ boot(howto) boothowto = howto; if ((howto & RB_NOSYNC) == 0 && waittime < 0) { + extern struct proc proc0; + + /* protect against curproc->p_stats.foo refs in sync() XXX */ + if (curproc == NULL) + curproc = &proc0; + waittime = 0; vfs_shutdown(); /* -- 2.20.1