]> git.baikalelectronics.ru Git - kernel.git/commit
[IPV4]: Store the net pointer on devinet's ctl tables
authorPavel Emelyanov <xemul@openvz.org>
Sun, 16 Dec 2007 21:31:14 +0000 (13:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:10 +0000 (14:58 -0800)
commit288f6b83ec91c14711578ade46d558033b72408b
tree3783b5871680d9cf5712c4aade60fc2e4c8e790f
parent4c6dbf5348a7a7f1b39029f58df0b41d0a3da9ce
[IPV4]: Store the net pointer on devinet's ctl tables

Some handers and strategies of devinet sysctl tables need
to know the net to propagate the ctl change to all the
net devices.

I use the (currently unused) extra2 pointer on the tables
to get it.

Holding the reference on the struct net is not possible,
because otherwise we'll get a net->ctl_table->net circular
dependency. But since the ctl tables are unregistered during
the net destruction, this is safe to get it w/o additional
protection.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c