From: Rusty Russell <rusty@rustcorp.com.au>
To: "Wang, Stanley" <stanley.wang@intel.com>
Cc: "Zhuang, Louis" <louis.zhuang@intel.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Subject: Re: Kernel module version support.
Date: Fri, 03 Jan 2003 16:54:25 +1100 [thread overview]
Message-ID: <20030103062622.4945B2C052@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 03 Jan 2003 13:36:19 +0800." <957BD1C2BF3CD411B6C500A0C944CA2601F1170F@pdsmsx32.pd.intel.com>
In message <957BD1C2BF3CD411B6C500A0C944CA2601F1170F@pdsmsx32.pd.intel.com> you
write:
> Hi Rusty
> Thanks for your rapid responding.
>
> And as you are the maintainer of kernel module support, I would like to know
> how
> you think about export some APIs for geting a specified module structure's
> pointer.
> Just like:
> struct module *get_module(const char *name)
> {
> struct module *mod;
> down(&module_mutex);
> mod = find_module(name);
> up(&module_mutex);
> return mod;
> }
> EXPORT_SYMBOL_GPL(get_module);
Well, you also need:
if (mod && !try_module_get(mod))
mod = NULL; /* Not ready, or vanishing. Ignore. */
Just before the "up(&module_mutex);".
I'm not convinced you don't want some other, more powerful interface,
though, like "get_ksymbol_address()" or something.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2003-01-03 6:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 5:36 Kernel module version support Wang, Stanley
2003-01-03 5:54 ` Rusty Russell [this message]
[not found] <957BD1C2BF3CD411B6C500A0C944CA2601F11712@pdsmsx32.pd.intel.com>
2003-01-04 5:06 ` Rusty Russell
[not found] <957BD1C2BF3CD411B6C500A0C944CA2601F11711@pdsmsx32.pd.intel.com>
2003-01-03 8:14 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2003-01-02 14:25 Wang, Stanley
2003-01-03 0:00 ` Rusty Russell
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=20030103062622.4945B2C052@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.zhuang@intel.com \
--cc=stanley.wang@intel.com \
/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