Subject: port-i386/3208: doshutdownhooks() can be called with interrupts enabled
To: None <>
From: Matthias Drochner <>
List: netbsd-bugs
Date: 02/11/1997 13:39:45
>Number:         3208
>Category:       port-i386
>Synopsis:       doshutdownhooks() can be called with interrupts enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 11 04:50:01 1997
>Originator:     Matthias Drochner
	KFA Juelich
>Release:        current
	NetBSD-current, i386
System: NetBSD zel024 1.2C NetBSD 1.2C (TULIP) #10: Tue Feb 11 11:48:43 MET 1997 drochner@zelz26:/home/drochner/netbsd-970206/sys/arch/i386/compile/TULIP i386

	doshutdownhooks() is called from boot(). There the global "cold" is
used to decide if the interrupts have to be turned off before.
However, there is a time window where "cold" is 0 but the interrupts are enabled:
in the second half of "configure()".
This bug is triggered when "halt" is typed at the "boot device" prompt (new mountroot
>From a quick look at the sources, other ports seem affected too.
	boot -a, type "halt" at boot device prompt
	I'm not sure what is The Righy Way: unconditional splhigh() in boot(),
set cold=0 earlier in configure() or do the user interaction not in setroot(),
but at mountroot time...