From root@gits.dyndns.org  Sat Aug 10 13:29:52 2002
Return-Path: <root@gits.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1565D37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Aug 2002 13:29:52 -0700 (PDT)
Received: from smtp.noos.fr (lafontaine.noos.net [212.198.2.72])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3436043E4A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Aug 2002 13:29:51 -0700 (PDT)
	(envelope-from root@gits.dyndns.org)
Received: (qmail 28791276 invoked by uid 0); 10 Aug 2002 20:09:49 -0000
Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.229.153]) (envelope-sender <root@gits.dyndns.org>)
          by 212.198.2.72 (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 10 Aug 2002 20:09:49 -0000
Received: from gits.gits.dyndns.org (19ldzqhue5uzpu1v@localhost [127.0.0.1])
	by gits.gits.dyndns.org (8.12.5/8.12.5) with ESMTP id g7AK9nSE009367
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 10 Aug 2002 22:09:49 +0200 (CEST)
	(envelope-from root@gits.dyndns.org)
Received: (from root@localhost)
	by gits.gits.dyndns.org (8.12.5/8.12.5/Submit) id g7AK9m3R009366;
	Sat, 10 Aug 2002 22:09:48 +0200 (CEST)
	(envelope-from root)
Message-Id: <200208102009.g7AK9m3R009366@gits.gits.dyndns.org>
Date: Sat, 10 Aug 2002 22:09:48 +0200 (CEST)
From: Cyrille Lefevre <cyrille.lefevre@laposte.net>
Reply-To: Cyrille Lefevre <cyrille.lefevre@laposte.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: unable to umount /dev/fd
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41527
>Category:       kern
>Synopsis:       unable to umount /dev/fd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 10 13:30:04 PDT 2002
>Closed-Date:    Fri Aug 23 10:45:52 PDT 2002
>Last-Modified:  Fri Aug 23 10:45:52 PDT 2002
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
ACME
>Environment:
System: FreeBSD gits 4.6-STABLE FreeBSD 4.6-STABLE #21: Sun Jul 28 09:42:24 CEST 2002 root@gits:/disk2/freebsd/stable/src/sys/compile/CUSTOM i386
>Description:
	nothing more to say.
>How-To-Repeat:
	# mount -t fdesc fdesc /dev/fd
	# mount -t fdesc
	fdesc on  (fdesc)
		 ^ oops!
	# df -t fdesc
	fdesc               1       1      0   100%    
							^ oops!
>Fix:
	none.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: njl 
State-Changed-When: Wed Aug 21 18:04:47 PDT 2002 
State-Changed-Why:  
mp->dm_rootdir is never set in fdescfs_mount!  I'll work on a patch but it 
may take a little while since there are other things missing there. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41527 

From: Nate Lawson <nate@root.org>
To: freebsd-bugs@FreeBSD.org, freebsd-gnats-submit@freebsd.org
Cc: cyrille.lefevre@laposte.net, alfred@freebsd.org
Subject: Re: kern/41527: unable to umount /dev/fd
Date: Thu, 22 Aug 2002 17:55:53 -0700 (PDT)

 Please use the following patch.  I have tested it and it works fine.  
 Since alfred has been in the code a lot recently, I'll commit the
 following if he agrees.
 
 -Nate
 
 --- fdesc_vfsops.c.orig	Fri Mar 29 20:03:52 2002
 +++ fdesc_vfsops.c	Thu Aug 22 17:40:23 2002
 @@ -79,6 +79,10 @@
  	int error = 0;
  	struct fdescmount *fmp;
  	struct vnode *rvp;
 +	size_t size;
 +
 +	if (path == NULL)
 +		panic("fdesc_mount: cannot mount as root");
  
  	/*
  	 * Update is a no-op
 @@ -100,6 +104,8 @@
  	mp->mnt_data = (qaddr_t) fmp;
  	vfs_getnewfsid(mp);
  
 +	(void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
 +	bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size);
  	bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
  	bcopy("fdesc", mp->mnt_stat.f_mntfromname, sizeof("fdesc"));
  	(void)fdesc_statfs(mp, &mp->mnt_stat, p);
 
State-Changed-From-To: analyzed->closed 
State-Changed-By: njl 
State-Changed-When: Fri Aug 23 10:44:53 PDT 2002 
State-Changed-Why:  
Fix applied to -stable, fdesc_vfsops.c v. 1.22.2.3 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41527 
>Unformatted:
