From 208056bf69918cfffba054fd9630a247b1b65096 Mon Sep 17 00:00:00 2001 From: mickey Date: Wed, 8 May 1996 01:26:32 +0000 Subject: [PATCH] fix reboot panic. --- sys/arch/alpha/alpha/machdep.c | 6 ++++++ sys/arch/amiga/amiga/machdep.c | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index 1959c82755c..c15255c21a0 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -770,6 +770,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(); /* diff --git a/sys/arch/amiga/amiga/machdep.c b/sys/arch/amiga/amiga/machdep.c index 4b3d0fc19e6..09ef853e715 100644 --- a/sys/arch/amiga/amiga/machdep.c +++ b/sys/arch/amiga/amiga/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.9 1996/05/04 13:38:33 niklas Exp $ */ +/* $OpenBSD: machdep.c,v 1.10 1996/05/08 01:30:40 mickey Exp $ */ /* $NetBSD: machdep.c,v 1.65 1996/05/01 09:56:22 veego Exp $ */ /* @@ -977,8 +977,13 @@ bootsync(void) /* * unmount filesystems */ - if (panicstr == 0) + if (panicstr == 0) { + extern struct proc proc0; + if (curproc == NULL) + curproc = &proc0; + vfs_unmountall(); + } for (iter = 0; iter < 20; iter++) { nbusy = 0; -- 2.20.1