diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-03 17:28:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 17:28:30 -0400 |
commit | 5677242f432102dea9e6eceec1dc089e2f709ca4 (patch) | |
tree | 73036437b91f2e8cd5427be48a588bff3af587eb /net/dccp | |
parent | eee4fe4ded6e9c196168aee8f9787771f4df9c90 (diff) |
[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>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 4 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 5669c895c873..b12803bcba56 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -1003,7 +1003,7 @@ static int __init dccp_v4_init(void) | |||
1003 | inet_register_protosw(&dccp_v4_protosw); | 1003 | inet_register_protosw(&dccp_v4_protosw); |
1004 | 1004 | ||
1005 | err = inet_ctl_sock_create(&dccp_v4_ctl_sk, PF_INET, | 1005 | err = inet_ctl_sock_create(&dccp_v4_ctl_sk, PF_INET, |
1006 | SOCK_DCCP, IPPROTO_DCCP); | 1006 | SOCK_DCCP, IPPROTO_DCCP, &init_net); |
1007 | if (err) | 1007 | if (err) |
1008 | goto out_unregister_protosw; | 1008 | goto out_unregister_protosw; |
1009 | out: | 1009 | out: |
@@ -1018,7 +1018,7 @@ out_proto_unregister: | |||
1018 | 1018 | ||
1019 | static void __exit dccp_v4_exit(void) | 1019 | static void __exit dccp_v4_exit(void) |
1020 | { | 1020 | { |
1021 | sock_release(dccp_v4_ctl_sk->sk_socket); | 1021 | inet_ctl_sock_destroy(dccp_v4_ctl_sk); |
1022 | inet_unregister_protosw(&dccp_v4_protosw); | 1022 | inet_unregister_protosw(&dccp_v4_protosw); |
1023 | inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP); | 1023 | inet_del_protocol(&dccp_v4_protocol, IPPROTO_DCCP); |
1024 | proto_unregister(&dccp_v4_prot); | 1024 | proto_unregister(&dccp_v4_prot); |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index cf598bfc6a18..94d749e6d494 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -1185,7 +1185,7 @@ static int __init dccp_v6_init(void) | |||
1185 | inet6_register_protosw(&dccp_v6_protosw); | 1185 | inet6_register_protosw(&dccp_v6_protosw); |
1186 | 1186 | ||
1187 | err = inet_ctl_sock_create(&dccp_v6_ctl_sk, PF_INET6, | 1187 | err = inet_ctl_sock_create(&dccp_v6_ctl_sk, PF_INET6, |
1188 | SOCK_DCCP, IPPROTO_DCCP); | 1188 | SOCK_DCCP, IPPROTO_DCCP, &init_net); |
1189 | if (err != 0) | 1189 | if (err != 0) |
1190 | goto out_unregister_protosw; | 1190 | goto out_unregister_protosw; |
1191 | out: | 1191 | out: |
@@ -1200,7 +1200,7 @@ out_unregister_proto: | |||
1200 | 1200 | ||
1201 | static void __exit dccp_v6_exit(void) | 1201 | static void __exit dccp_v6_exit(void) |
1202 | { | 1202 | { |
1203 | sock_release(dccp_v6_ctl_sk->sk_socket); | 1203 | inet_ctl_sock_destroy(dccp_v6_ctl_sk); |
1204 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); | 1204 | inet6_del_protocol(&dccp_v6_protocol, IPPROTO_DCCP); |
1205 | inet6_unregister_protosw(&dccp_v6_protosw); | 1205 | inet6_unregister_protosw(&dccp_v6_protosw); |
1206 | proto_unregister(&dccp_v6_prot); | 1206 | proto_unregister(&dccp_v6_prot); |