Bug 14590

Summary: kernel panic writing to floppy
Product: Base System Reporter: Mikael Eklund <miek>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description Mikael Eklund 1999-10-29 15:00:00 UTC
	Kernel panics when trying to write to a write-protected floppy.

Fix: 

Use the correct (raw) device instead. :-)
How-To-Repeat: 
	Insert a write-protected floppy.
	Run the command: dd if=foo of=/dev/fd0 bs=512
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1999-10-30 07:46:18 UTC
State Changed
From-To: open->suspended

This is no longer a problem for since block devices now act as char devices. 
I am not sure however, if this problem would also manifest itself if the 
faulty floppy was mounted as a filesystem, therefore the "suspend" state. 

Comment 2 matt 2000-08-03 05:30:00 UTC
Using 3.4-RELEASE:

The dd command using the char device (rfd0) works fine (no panic), but using the block device (fd0) panics.

On to the open->suspend rationale:

Mounting a writeable floppy, pulling the disk, write-protecting it, replacing it, and then writing to the FS results in a console message complaining about writing to a write-protected media (expected), but when the FS is unmounted, a kernel panic occurs.

Jul 17 19:02:33 styx /kernel: panic: vinvalbuf: dirty bufs
Jul 17 19:02:33 styx /kernel:
Jul 17 19:02:33 styx /kernel: syncing disks... 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 giving up

[ 1 1 1... may be replaced by 2 2 2...]

Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-03 08:12:01 UTC
State Changed
From-To: suspended->closed

So then we're back to a known problem.  Duplicate of kern/11808 
and kern/10870 .