From owner-freebsd-bugs Thu Aug 22 17:55:59 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B04A137B400 for ; Thu, 22 Aug 2002 17:55:56 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 1508E43E72 for ; Thu, 22 Aug 2002 17:55:52 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 61036 invoked by uid 1000); 23 Aug 2002 00:55:53 -0000 Date: Thu, 22 Aug 2002 17:55:53 -0700 (PDT) From: Nate Lawson 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 In-Reply-To: <200208220106.g7M16Lnm031116@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message