lkml.org 
[lkml]   [2004]   [Mar]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 3 Mar 2004 11:22:39 +0200
FromMuli Ben-Yehuda <>
SubjectRe: modules registering as sysctl handlers
On Wed, Mar 03, 2004 at 11:05:39AM +1100, Rusty Russell wrote:

> 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.

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

I'm building 2.6.3-bk with allmodconfig now. Once it's done, I'll post
the resulting list. 

#!/bin/sh

KERNEL_VER=2.6.1
for f in `find /lib/modules/${KERNEL_VER} -name "*.ko"`; do 
    nm $f | grep register_sysctl 2>&1 > /dev/null
    if [ "x$?" == "x0" ]; then
        echo "$f uses register_sysctl"
    fi
done
Cheers, 
Muli 
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:01    [from the cache]
©2003-2008