VFS bug (?)

Daniel Robert Franklin (drf03@uow.edu.au)
Sat, 21 Nov 1998 19:24:54 +1100 (EST)


I noticed a small bug when mounting a filesystem on a directory in which
you are currently operating (which shouldn't be allowed, should it?).
Anyway, here is an illustration, with 2.1.128:

[daniel@Paganini]/floppy$ mount .
[daniel@Paganini]/floppy$ ls -la
/bin/ls: test1.txt: No such file or directory
/bin/ls: test2.txt: No such file or directory
/bin/ls: test3.txt: No such file or directory
total 8
drwxr-xr-x 2 daniel daniel 7168 Jan 1 1970 ./
drwxr-xr-x 22 root root 1024 Nov 9 17:50 ../
[daniel@Paganini]/floppy$ cd ../floppy
[daniel@Paganini]/floppy$ ls -la
total 10
drwxr-xr-x 2 daniel daniel 7168 Jan 1 1970 ./
drwxr-xr-x 22 root root 1024 Nov 9 17:50 ../
-rw-r--r-- 1 daniel daniel 16 Nov 22 1998 test1.txt
-rw-r--r-- 1 daniel daniel 0 Nov 22 1998 test2.txt
-rw-r--r-- 1 daniel daniel 8 Nov 22 1998 test3.txt
[daniel@Paganini]/floppy$ umount .
umount: /floppy: device is busy
[daniel@Paganini]/floppy$ cd ..
[daniel@Paganini]/$ umount floppy

That is obviously wrong, and so is this:

[daniel@Paganini]/$ cd floppy
[daniel@Paganini]/floppy$ mount .
[daniel@Paganini]/floppy$ umount .
[daniel@Paganini]/floppy$

The fstab entry is here:

/dev/fd0 /floppy vfat noauto,user 1 1

It does it with all filesystems I tested, and on four different machines
with different distributions, libcs etc, and it didn't happen with 2.0.x.

It doesn't seem to cause an oops or anything, but it is just plain wrong.
I have only just started learning about the kernel so my knowledge is
inadequate to code a patch ;-)

One other 'bug': Quake2 makes horrible sounds with this kernel (2.1.128).
Other audio applications are fine.

Anyway, hope that's of some use to someone...

- Daniel

-- 
******************************************************************************
*       Daniel Franklin - 4th Year Electrical Engineering Student
*       drf03@uow.edu.au
******************************************************************************

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/