Messages in this thread | | | Subject | Re: modules registering as sysctl handlers | From | Rusty Russell <> | Date | Wed, 03 Mar 2004 11:05:39 +1100 |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |