From owner-freebsd-bugs Thu Aug 22 18: 0:21 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7050737B40F for ; Thu, 22 Aug 2002 18:00:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 176A043E6A for ; Thu, 22 Aug 2002 18:00:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7N10CJU021348 for ; Thu, 22 Aug 2002 18:00:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7N10CFd021347; Thu, 22 Aug 2002 18:00:12 -0700 (PDT) Date: Thu, 22 Aug 2002 18:00:12 -0700 (PDT) Message-Id: <200208230100.g7N10CFd021347@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Nate Lawson Subject: Re: kern/41527: unable to umount /dev/fd Reply-To: Nate Lawson 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 The following reply was made to PR kern/41527; it has been noted by GNATS. 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 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); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message