From nobody@FreeBSD.org  Thu Nov 25 21:05:45 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5A79216A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Nov 2004 21:05:45 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 479EF43D55
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Nov 2004 21:05:45 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iAPL5jBH001393
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 25 Nov 2004 21:05:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iAPL5jnW001392;
	Thu, 25 Nov 2004 21:05:45 GMT
	(envelope-from nobody)
Message-Id: <200411252105.iAPL5jnW001392@www.freebsd.org>
Date: Thu, 25 Nov 2004 21:05:45 GMT
From: "J. Porter Clark" <jpc@drum.msfc.nasa.gov>
To: freebsd-gnats-submit@FreeBSD.org
Subject: linprocfs can be mounted on top of itself many times
X-Send-Pr-Version: www-2.3

>Number:         74387
>Category:       bin
>Synopsis:       mount(8) linprocfs can be mounted on top of itself many times
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 25 21:10:19 GMT 2004
>Closed-Date:    Wed Mar 24 17:22:04 UTC 2010
>Last-Modified:  Wed Mar 24 17:22:04 UTC 2010
>Originator:     J. Porter Clark
>Release:        5.3-STABLE
>Organization:
NASA MSFC
>Environment:
FreeBSD auricle.charter.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Nov 24 16:07:39 CST 2004     jpc@auricle.charter.net:/usr/obj/usr/src/sys/AURICLE5  i386

>Description:
mount -a, when executed repeatedly, mounts a linprocfs filesystem listed in /etc/fstab multiple times.  This isn't like procfs.
Although I first noticed this problem on 5.3, it is present on 4.10.   
>How-To-Repeat:
With the standard line in /etc/fstab for linprocfs, run mount -a several times, then run mount.  You will see an output like this:
$ mount
/dev/ad0s3a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s3e on /tmp (ufs, local, soft-updates)
/dev/ad0s3g on /usr (ufs, local, soft-updates)
/dev/ad0s3f on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
linprocfs on /usr/compat/linux/proc (linprocfs, local)

Note that the extra mounts can be umounted, one at a time, similarly.
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: ceri 
State-Changed-When: Wed Dec 1 12:53:41 GMT 2004 
State-Changed-Why:  
This is because /compat is a symlink to /usr/compat; mount(8) does a 
check to see whether the filesystem is mounted before mounting the 
filesystem, and it is being fooled by the symlink - I suspect that you 
have the mount point specified as /compat/linux/proc in your fstab - if 
you change that to /usr/compat/linux/proc then the reported behaviour is 
corrected. 

I doubt that it's worth changing mount(8) to correct this, but will 
leave this as "analyzed" in case anybody thinks it is. 

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

From: Ceri Davies <ceri@submonkey.net>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: misc/74387: linprocfs can be mounted on top of itself many times
Date: Wed, 1 Dec 2004 12:54:42 +0000

 I have also refiled this in category bin as it's not a kernel issue.

From: Alexander Best <alexbestms@wwu.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: bin/74387: mount(8) linprocfs can be mounted on top of itself
 many times
Date: Wed, 24 Mar 2010 18:09:59 +0100 (CET)

 this pr is no longer reproducible under HEAD (r205561).
 
 `cat /etc/fstab|grep linprocfs`:
 linprocfs               /compat/linux/proc      linprocfs       rw      0
 0
 linprocfs               /usr/local/gentoo-stage3/proc   linprocfs       rw
 0       0
 
 `mount|wc`:
       11      55     491
 
 `for i in `jot - 1 10`; do mount -a; done`
 
 `mount|wc`:
       11      55     491
 
 sbin/mount/mount.c:466 has a comment saying:
 
 /* The user may have specified a symlink in fstab, resolve the path */
 
 so ismounted() takes care of this now.
 
 the commit that fixed this was r154512 (HEAD, stable8 and stable7). it's been
 mfc'ed to stable6 in r154774.
 
 so this pr can be closed.
 
 -- 
 Alexander Best
State-Changed-From-To: analyzed->closed 
State-Changed-By: gavin 
State-Changed-When: Wed Mar 24 17:21:06 UTC 2010 
State-Changed-Why:  
Alexander Best reports that this was fixed some time ago and can no 
longer be reproduced. 

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