Subject: kern/8964: panic on reboot(2) if an LFS is mounted read-only
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/06/1999 22:48:46
>Number:         8964
>Category:       kern
>Synopsis:       panic on reboot(2) if an LFS is mounted read-only
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec  6 22:48:00 1999
>Originator:     ITOH Yasufumi
>Release:        1.4P (Dec. 3, 1999)
System: NetBSD 1.4P NetBSD 1.4P (ACHA.elf) #20: Sun Dec 5 14:55:44 JST 1999 x68k

no SOFTDEP in the kernel config.

	The system panic()s on reboot if
	 1. an LFS is mounted, and
	 2. the filesystem is read-only.

	This problem seems to be introduced by the softdep merge.

	Mount an LFS in read-only mode and reboot the system.
	Here's an example when the root filesystem is an LFS.

	# mount
	root_device on / type lfs (local, read-only)
	# reboot
	Dec  6 08:29:42 init: kernel security level changed from 0 to 1
	syncing disks... panic: bawrite LFS buffer
	Stopped in reboot at	cpu_Debugger+0x6:	unlk	a6
	db> trace
	cpu_Debugger(2004,1,2710,519c00,54fc54) + 6
	panic(116d2c,54fe68,45bd8,54fe60,12abd4) + 56
	lfs_bwrite(54fe60,12abd4,519c00,54fe9c,4bd16) + 1c
	bawrite(519c00) + 36
	vfs_shutdown(54ff3c,300e0,0,0,0) + be
	cpu_reboot(0,0,0,530640,1) + 3c
	sys_reboot(530640,54ff88,54ff80) + 52
	syscall(d0) + 196
	trap0() + e

	LFS buffers should not be marked asynchronous.