From: Keith Owens <kaos@ocs.com.au>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Revealing unload_lock to everyone
Date: Fri, 01 Feb 2002 12:02:52 +1100 [thread overview]
Message-ID: <23095.1012525372@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Thu, 31 Jan 2002 15:58:17 -0800." <3C59DA19.5060403@us.ibm.com>
On Thu, 31 Jan 2002 15:58:17 -0800,
Dave Hansen <haveblue@us.ibm.com> wrote:
>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?
try_inc_mod_count().
next prev parent reply other threads:[~2002-02-01 1:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 23:58 Revealing unload_lock to everyone Dave Hansen
2002-02-01 1:02 ` Keith Owens [this message]
[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=23095.1012525372@kao2.melbourne.sgi.com \
--to=kaos@ocs.com.au \
--cc=haveblue@us.ibm.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.