From rhh@pagesz.net  Sun Nov 29 16:22:01 1998
Received: from nina.pagesz.net (nina.pagesz.net [208.194.157.3])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA21645
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Nov 1998 16:22:00 -0800 (PST)
          (envelope-from rhh@pagesz.net)
Received: from stealth.dummynet. (juana-42.pagesz.net [208.213.126.42])
	by nina.pagesz.net (8.8.7/8.8.7) with ESMTP id TAA31121;
	Sun, 29 Nov 1998 19:22:06 -0500
Received: (from rhh@localhost)
	by stealth.dummynet. (8.9.1/8.8.8) id TAA01296;
	Sun, 29 Nov 1998 19:22:35 -0500 (EST)
	(envelope-from rhh)
Message-Id: <199811300022.TAA01296@stealth.dummynet.>
Date: Sun, 29 Nov 1998 19:22:35 -0500 (EST)
From: aa8vb@pagesz.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: aa8vb@pagesz.net
Subject: incorrect mount crashes 3.0-RELEASE
X-Send-Pr-Version: 3.2

>Number:         8902
>Category:       kern
>Synopsis:       Incorrect mount crashes 3.0-RELEASE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 29 16:30:01 PST 1998
>Closed-Date:    Tue Dec 22 08:41:23 PST 1998
>Last-Modified:  Tue Dec 22 08:41:46 PST 1998
>Originator:     Randall Hopper
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
self
>Environment:

	Stock 3.0-RELEASE installed.
	Mix of FreeBSD UFS DOS FAT file systems.

>Description:

	I've done this twice, so I think it's pretty reproducable.
	The system locks and reboots (after 15 seconds or so) when
	I incorrectly try to mount a DOS FAT file system as UFS, and
	then (seeing my error and the "invalid superblock" message), I
	turn around and try to correctly mount it as MSDOS.  This 
	locks and reboots the entire system.

>How-To-Repeat:

        Given a DOS FAT file system on /dev/wd0s5 (extended DOS partition).
	Then just do:

              mkdir /f
	      mount /dev/wd0s5 /f
	      < you get a warning msg; of course; this isn't a UFS >
	      mount -t msdos /dev/wd0s5 /f
	      < SYSTEM LOCKS UP / REBOOTS >

        BTW, I doubt that it's relevent, but I have wd0s5 mounted 
	read-only in my fstab:

	      /dev/wd0s5   /f   msdos   ro,-m555   0   0

	so to be absolutely complete, what I actually did was this:

	      umount /f

        followed by the above mount commands.

>Fix:
	
	Not known.

>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: aa8vb@pagesz.net, FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: kern/8902: incorrect mount crashes 3.0-RELEASE
Date: Mon, 30 Nov 1998 14:07:07 +1100

 >>Description:
 >
 >	I've done this twice, so I think it's pretty reproducable.
 >	The system locks and reboots (after 15 seconds or so) when
 >	I incorrectly try to mount a DOS FAT file system as UFS, and
 >	then (seeing my error and the "invalid superblock" message), I
 >	turn around and try to correctly mount it as MSDOS.  This 
 >	locks and reboots the entire system.
 
 This bug has already been reported in several PRs.  A fix was committed
 but was backed out because it was wrong for the SMP case.
 
 RCS file: /home/ncvs/src/sys/kern/vfs_subr.c,v
 Working file: vfs_subr.c
 head: 1.173
 ----------------------------
 revision 1.166
 date: 1998/10/14 15:05:52;  author: dt;  state: Exp;  lines: +1 -13
 Backed out rev. 1.164. It caused problems on SMP.
 
 PR:		8309
 ----------------------------
 ...
 ----------------------------
 revision 1.164
 date: 1998/10/12 20:14:09;  author: dt;  state: Exp;  lines: +13 -2
 UnVMIO vnodes of block devices when they are no longer in use. (Some
 things, like msdosfs, do not work (panic) on devices with VMIO enabled.
 FFS enable VMIO on mounted devices, and nothing previously disabled it, so,
 after you mounted FFS floppy, you could not mount msdosfs floppy anymore...)
 
 This is mostly a quick before-release fix.
 
 Reviewed by:	bde
 ----------------------------
 
 See PR7415 form more ambitious fixes.
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: luoqi 
State-Changed-When: Tue Dec 22 08:41:23 PST 1998 
State-Changed-Why:  
Fix committed. 
>Unformatted:
