Denis V. Lunev 775516bfa2 [NETNS]: Namespace stop vs 'ip r l' race.
During network namespace stop process kernel side netlink sockets
belonging to a namespace should be closed. They should not prevent
namespace to stop, so they do not increment namespace usage
counter. Though this counter will be put during last sock_put.

The raplacement of the correct netns for init_ns solves the problem
only partial as socket to be stoped until proper stop is a valid
netlink kernel socket and can be looked up by the user processes. This
is not a problem until it resides in initial namespace (no processes
inside this net), but this is not true for init_net.

So, hold the referrence for a socket, remove it from lookup tables and
only after that change namespace and perform a last put.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Tested-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28 15:08:08 -08:00
..
2008-01-28 15:02:43 -08:00
2008-01-28 15:02:03 -08:00
2008-01-28 15:00:48 -08:00
2008-01-28 15:03:35 -08:00
2008-01-28 15:01:04 -08:00
2007-12-20 14:03:11 -08:00
2008-01-28 15:02:44 -08:00
2008-01-28 15:01:05 -08:00
2008-01-28 14:54:10 -08:00
2008-01-28 14:56:29 -08:00
2005-04-16 15:20:36 -07:00