From: Rusty Russell <rusty@rustcorp.com.au>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: Muli Ben-Yehuda <mulix@mulix.org>,
Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: Re: modules registering as sysctl handlers
Date: Wed, 03 Mar 2004 11:05:39 +1100 [thread overview]
Message-ID: <1078272339.15766.5.camel@bach> (raw)
In-Reply-To: <20040302124106.GQ16357@parcelfarce.linux.theplanet.co.uk>
On Tue, 2004-03-02 at 23:41, viro@parcelfarce.linux.theplanet.co.uk
wrote:
> On Tue, Mar 02, 2004 at 02:29:09PM +0200, Muli Ben-Yehuda wrote:
> > Hi
> >
> > Looking at 2.6.3-bk, it appears that the sysctl code does not raise a
> > module's reference count before calling a sysctl handler registered by
> > that module.
> >
> > - are modules allowed to register sysctl handlers?
> > register_sysctl_table is exported, so I imagine so.
> >
> > - am I missing something and modules are in fact protected against
> > concurrent unloading and invocation of sysctl?
>
> They are not and no, bumping refcount would not be anywhere near enough.
Al is referring to the fact that there's no protection for a dynamically
allocated ctl_table.
However, an owner field and standard module_get() would solve the case
of statically declared ctl_table.
I don't know that there's a current user who requires it though?
Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell
next prev parent reply other threads:[~2004-03-03 0:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-02 12:29 modules registering as sysctl handlers Muli Ben-Yehuda
2004-03-02 12:41 ` viro
2004-03-03 0:05 ` Rusty Russell [this message]
2004-03-03 9:22 ` Muli Ben-Yehuda
2004-03-03 10:43 ` viro
2004-03-04 10:38 ` Muli Ben-Yehuda
2004-03-04 13:59 ` Dave Jones
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=1078272339.15766.5.camel@bach \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mulix@mulix.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
/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