Re: modules registering as sysctl handlers

From: viro
Date: Wed Mar 03 2004 - 05:44:34 EST


On Wed, Mar 03, 2004 at 11:22:39AM +0200, Muli Ben-Yehuda wrote:
> > However, an owner field and standard module_get() would solve the case
> > of statically declared ctl_table.
>
> That's what I had in mind.
>
> > I don't know that there's a current user who requires it though?
>
> Yes, there are. Using the attached scriptlet on a 2.6.1 tree I had
> lying around:
>
> [root@hydra kernel]# /tmp/find-register-sysctl
> /lib/modules/2.6.1/kernel/drivers/cdrom/cdrom.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/drivers/parport/parport.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/appletalk/appletalk.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/ipx/ipx.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/irda/irda.ko uses register_sysctl
> /lib/modules/2.6.1/kernel/net/sctp/sctp.ko uses register_sysctl

At least parport has both module-wide and per-port sysctls. The
latter are dynamic even if module support is turned off. I seriously
suspect that other examples are similar.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/