From: Randy Dunlap <randy.dunlap@intel.com>
To: linux-kernel@vger.kernel.org
Subject: usbdevfs mount 2x, umount 1x
Date: Wed, 29 Nov 2000 16:47:27 -0800 [thread overview]
Message-ID: <3A25A39F.3162018E@intel.com> (raw)
[I reported this a couple of months back. Got no
feedback on it. If it's just a DDT (don't do that)
or a user error, please say so.]
Summary: After I mount usbdevfs 2 times, and umount it
1 time, the usbcore module use count prevents it from
being rmmod-ed.
This is test12-pre2.
1. Start by loading usbcore and uhci modules:
[root@dragon rdunlap]# lsmod
Module Size Used by
uhci 18848 0 (unused)
usbcore 50656 0 [uhci]
and the /proc/bus/usb mount point is empty:
[rdunlap@dragon rdunlap]$ ls -l /proc/bus/usb
total 0
2. I enter "mount usb", which uses this entry
from /etc/fstab:
usb /proc/bus/usb usbdevfs defaults,user 0 0
'mount' then tells me (usb line extracted):
usb on /proc/bus/usb type usbdevfs (rw,noexec,nosuid,nodev)
and 'lsmod' tells me:
[root@dragon rdunlap]# lsmod
Module Size Used by
uhci 18848 0 (unused)
usbcore 50656 1 [uhci]
3. Some time passes. I mount usbdevfs again, by entering:
[root@dragon rdunlap]# mount -t usbdevfs usbdevfs /proc/bus/usb
'lsmod' now tells me:
[root@dragon rdunlap]# lsmod
Module Size Used by
uhci 18848 0 (unused)
usbcore 50656 2 [uhci]
and 'mount' tells me:
usb on /proc/bus/usb type usbdevfs (rw,noexec,nosuid,nodev)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
4. I 'umount usbdevfs'. Now 'lsmod' tells me:
[root@dragon rdunlap]# umount usbdevfs
[root@dragon rdunlap]# lsmod
Module Size Used by
uhci 18848 0 (unused)
usbcore 50656 1 [uhci]
and 'mount' shows no usb or usbdevfs entries listed.
Now I rmmod uhci and 'lsmod' tells me:
[root@dragon rdunlap]# rmmod uhci
[root@dragon rdunlap]# lsmod
Module Size Used by
usbcore 50656 1
and I can't rmmod usbcore. The /proc/bus/usb mount
point is still populated and the 'drivers' file
contains correct data:
[rdunlap@dragon rdunlap]$ ls -l /proc/bus/usb
total 0
-r--r--r-- 1 root root 0 Nov 29 16:17 devices
-r--r--r-- 1 root root 0 Nov 29 16:17 drivers
[rdunlap@dragon rdunlap]$ cat /proc/bus/usb/drivers
hub
usbdevfs
[rdunlap@dragon rdunlap]$
So is this just a case of root being able to shoot self
in foot or a proc-fs or module counter problem?
Notes:
1. Reversing the order of steps 3 and 4 gives the
same results.
2. Changing the device name in
'mount -t usbdevfs usbdevfs /proc/bus/usb' to be
'mount -t usbdevfs usbfs /proc/bus/usb' gives the
same results (when followed by 'umount usbfs').
Thanks,
~Randy
--
_______________________________________________
|randy.dunlap_at_intel.com 503-677-5408|
|NOTE: Any views presented here are mine alone|
|& may not represent the views of my employer.|
-----------------------------------------------
-
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/
next reply other threads:[~2000-11-30 1:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-30 0:47 Randy Dunlap [this message]
2000-11-30 0:52 ` Alexander Viro
2000-11-30 1:01 ` Jan-Benedict Glaw
2000-11-30 1:07 Dunlap, Randy
2000-11-30 1:15 ` Alexander Viro
2000-11-30 1:40 Dunlap, Randy
2000-11-30 23:08 Dunlap, Randy
2000-12-02 6:23 ` Alexander Viro
2000-12-02 21:03 Andries.Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A25A39F.3162018E@intel.com \
--to=randy.dunlap@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®