Subject: kern/146: I can "mount /tmp" multiple times, MFS may need a fix
To: None <gnats-admin>
From: None <peter@wonderland.org>
List: netbsd-bugs
Date: 03/01/1994 14:05:03
>Number:         146
>Category:       kern
>Synopsis:       mounting /tmp/multiple time with mfs works, and it shouldn't
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar  1 14:05:02 1994
>Originator:     Peter Galbavy
>Organization:
Wonderland
>Release:        0.9a 1st March 1994
>Environment:
the usual, 486DX/1742/32Mb etc
System: NetBSD alice.wonderland.org 0.9a ALICE#0 i386


>Description:
I can mount my /tmp directory multiple times, and my fstab says:

/dev/sd0b /tmp mfs rw 0 0

and df:

Filesystem               1K-blocks    Used   Avail Capacity  Mounted on
...
mfs:14                       47245      10   44872     0%    /tmp
mfs:9699                     47245       1   44881     0%    /tmp

This is true for both the i386 and sparc platforms.

I do not want to think of what may be happening to the data in /tmp,
so I backed out quickly. Different processes are handling the mfs mounts,
but when I do "mount -a" I am used to it only mounting filesystems
which are not already there...

I do not know how serious this could really be. If at all.
>How-To-Repeat:
Have a line like the above in /etc/fstab and do "mount /tmp" multiple
times.
>Fix:
I suspect that the mount_mfs should check whether the directory/device
is alreay in use.
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------