Harald Welte's blog
   

RSS

Harald's Web
gnumonks.org
hmw-consulting.de
sysmocom.de

Projects
OpenBSC
OsmocomBB
OsmocomTETRA
deDECTed.org
gpl-violations.org
gpl-devices.org
OpenMoko
gnufiish
OpenEZX
OpenBeacon
OpenPCD
librfid
openmrtd
opentom.org
netfilter/iptables

Categories

Archives

Other Bloggers
David Burgess
Zecke
Dieter Spaar
Michael Lauer
Stefan Schmidt
Rusty Russell
David Miller
Martin Pool
Jeremy Kerr
Tim Pritlove (German)
fukami (German)
fefe (German)
Bradley M. Kuhn
Lawrence Lessig
Kalyan Varma

Aggregators
kernelplanet.org
planet.netfilter.org
planet.openezx.org
planet.openmoko.org
planet.foss.in

Ohloh profile for laforge
identi.ca
twitter
flattr
Linked in
Xing

Creative Commons License
Articles on this blog/journal are licensed under a Creative Commons Attribution-NoDerivs 2.5 License.


blosxom


Contact/Impressum

       
Fri, 22 Jul 2005
Revamping netlink sockets

While writing on nfnetlink, ctnetlink, nfnetlink_queue and other bits of the 'new' netfilter infrastructure, I've run into a number of minor shortcomings in netlink that are surprisingly hard to overcome.

One of them is refcounting, i.e. making sure that the module implementing a particular functionality via netlink doesn't silently disappear by module unloading while sockets are still open from userspace.

I've now finished one implementation, but it might cause module refcount leaks if a kernel module implementing a netlink socket closes the socket in some other codepath but the module_exit() function.

The other problem (slightly harder) is module auto-loading. It's my position that the kernel should autoload the respective module once a userspace process opens a netlink socket. However, this can not be made obligatory, since multiple userspace processes might also just wish to communicate with themselves, with no listener/sender in the kernel at all.

[ /linux | permanent link ]