]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
IPVS: Change of socket usage to enable name space exit.
authorHans Schillstrom <hans@schillstrom.com>
Tue, 3 May 2011 20:09:30 +0000 (22:09 +0200)
committerSimon Horman <horms@verge.net.au>
Sun, 8 May 2011 22:05:35 +0000 (07:05 +0900)
commit421eab4cf318ce47c1daae391e54d1b427c6687b
tree5ed32af231cb56ae82924778a23a465be08af5ce
parente31b2b228439eee23b8ccc186d3c0e77bd69123b
IPVS: Change of socket usage to enable name space exit.

If the sync daemons run in a name space while it crashes
or get killed, there is no way to stop them except for a reboot.
When all patches are there, ip_vs_core will handle register_pernet_(),
i.e. ip_vs_sync_init() and ip_vs_sync_cleanup() will be removed.

Kernel threads should not increment the use count of a socket.
By calling sk_change_net() after creating a socket this is avoided.
sock_release cant be used intead sk_release_kernel() should be used.

Thanks Eric W Biederman for your advices.

Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
[horms@verge.net.au: minor edit to changelog]
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_sync.c