[NETNS]: Inet control socket should not hold a namespace.
This is a generic requirement, so make inet_ctl_sock_create namespace aware and create a inet_ctl_sock_destroy wrapper around sk_release_kernel. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
eee4fe4ded
commit
5677242f43
@@ -1185,7 +1185,7 @@ static int __init dccp_v6_init(void)
|
||||
inet6_register_protosw(&dccp_v6_protosw);
|
||||
|
||||
err = inet_ctl_sock_create(&dccp_v6_ctl_sk, PF_INET6,
|
||||
SOCK_DCCP, IPPROTO_DCCP);
|
||||
SOCK_DCCP, IPPROTO_DCCP, &init_net);
|
||||
if (err != 0)
|
||||
goto out_unregister_protosw;
|
||||
out:
|
||||
@@ -1200,7 +1200,7 @@ out_unregister_proto:
|
||||
|
||||
static void __exit dccp_v6_exit(void)
|
||||
{
|
||||
sock_release(dccp_v6_ctl_sk->sk_socket);
|
||||
inet_ctl_sock_destroy(dccp_v6_ctl_sk);
|
||||
inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP);
|
||||
inet6_unregister_protosw(&dccp_v6_protosw);
|
||||
proto_unregister(&dccp_v6_prot);
|
||||
|
Reference in New Issue
Block a user