From: stamit <ewstam@softhome.net>
To: linux-hotplug@vger.kernel.org
Subject: Unloading drivers, start-up, shut-down and some clean-ups (a problem)
Date: Tue, 02 Oct 2001 02:00:00 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-100206809619773@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
(please don't hate me for this... :-)
There are two obvious problems with the previous patch...
1. From the beginning I tried to verbosely comment the scripts (so they
can be self-explanatory and easy to read) and, apparently, I forgot to
update the comments in the "uhci.agent" after reorganizing the scripts
(to experiment with), so... the comments in /etc/hotplug/pci/uhci.agent
are wrong, misleading and confusing (ouch)!
2. Only after posting that previous patch I realised that the way in
which the "start" and "stop" events are passed down from policy agents
to driver agents was, well, not so good. "start" was passed if a kernel
module was already loaded and "stop" was passed if a module was already
unloaded. Well, it turns out that the right thing is to handle
start/stop in the same (almost) way that add/remove events are handled.
The only difference is that, for start/stop, $MODULE is also exported
and is the name of the currently loaded kernel module ("-" if none, "#"
if undetermined).
Now, the final thing that remains for unloading to be complete is
reference counting. I tried to do it with bash (by storing counts in
*.ref files in the driver directories) and guess what I stumbled to... a
race condition! Multiple hotplug events can be processed by the scripts
at the same time. So I took it back. Isn't there a way to use modutils
programs to play with the module's real refrence counts? It would make
things a whole lot easier (and safer).
[-- Attachment #2: hotplug-2001_04_24-patch.diff.gz --]
[-- Type: application/x-gzip, Size: 33259 bytes --]
next reply other threads:[~2001-10-02 2:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-02 2:00 stamit [this message]
2001-10-03 1:41 ` Unloading drivers, start-up, shut-down and some clean-ups (a problem) Keith Owens
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=marc-linux-hotplug-100206809619773@msgid-missing \
--to=ewstam@softhome.net \
--cc=linux-hotplug@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.