From: Dave Hansen <haveblue@us.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Dan Maas <dmaas@dcine.com>, Ben Collins <bcollins@debian.org>
Subject: Revealing unload_lock to everyone
Date: Thu, 31 Jan 2002 15:58:17 -0800 [thread overview]
Message-ID: <3C59DA19.5060403@us.ibm.com> (raw)
This came up in a conversation about ieee1394_core.c. In 2.5.3, the BKL
is used to protect a module from being unloaded. The code looks like this:
lock_kernel();
read_lock(&ieee1394_chardevs_lock);
file_ops = ieee1394_chardevs[blocknum].file_ops;
module = ieee1394_chardevs[blocknum].module;
read_unlock(&ieee1394_chardevs_lock);
...
INCREF(module);
unlock_kernel();
The question is, how can we keep the module from being unloaded between
the file_ops assignment, and the INCREF. Do we have a general purpose
way, other than the BKL, to keep a module from being unloaded? There is
unload_lock, but it is static to module.c. We can always make it
global, but is there a better solution?
--
Dave Hansen
haveblue@us.ibm.com
next reply other threads:[~2002-01-31 23:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 23:58 Dave Hansen [this message]
2002-02-01 1:02 ` Revealing unload_lock to everyone Keith Owens
[not found] <200202011010.g11AAIIZ008097@tigger.cs.uni-dortmund.de>
2002-02-01 15:35 ` Dave Hansen
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=3C59DA19.5060403@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=bcollins@debian.org \
--cc=dmaas@dcine.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 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.