2.4.0-pre able to mount SHM twice

From: Jordan Mendelson (jordy@napster.com)
Date: Wed Jan 03 2001 - 17:38:51 EST


This is probably due to the source being 'none', but the shm mount point
can be mounted twice at the same mount point.

Shouldn't mount(2) return -EBUSY in this case?

# cat /etc/mtab
/dev/hda4 / ext2 rw,errors=remount-ro,errors=remount-ro 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hda3 /mnt/win vfat rw 0 0
none /proc/bus/usb usbdevfs rw 0 0

# mount /dev/shm
# cat /etc/mtab
/dev/hda4 / ext2 rw,errors=remount-ro,errors=remount-ro 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hda3 /mnt/win vfat rw 0 0
none /proc/bus/usb usbdevfs rw 0 0
none /dev/shm shm rw 0 0

# mount /dev/shm
# cat /etc/mtab
/dev/hda4 / ext2 rw,errors=remount-ro,errors=remount-ro 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hda3 /mnt/win vfat rw 0 0
none /proc/bus/usb usbdevfs rw 0 0
none /dev/shm shm rw 0 0
none /dev/shm shm rw 0 0

# umount /dev/shm
# cat /etc/mtab
/dev/hda4 / ext2 rw,errors=remount-ro,errors=remount-ro 0 0
proc /proc proc rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/hda1 /boot ext2 rw 0 0
/dev/hda3 /mnt/win vfat rw 0 0
none /proc/bus/usb usbdevfs rw 0 0

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



This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:16 EST