aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-03 14:28:30 -0700
committerDavid S. Miller <davem@davemloft.net>2008-04-03 14:28:30 -0700
commit5677242f432102dea9e6eceec1dc089e2f709ca4 (patch)
tree73036437b91f2e8cd5427be48a588bff3af587eb /net/ipv4/af_inet.c
parenteee4fe4ded6e9c196168aee8f9787771f4df9c90 (diff)
downloadkernel_samsung_smdk4412-5677242f432102dea9e6eceec1dc089e2f709ca4.zip
kernel_samsung_smdk4412-5677242f432102dea9e6eceec1dc089e2f709ca4.tar.gz
kernel_samsung_smdk4412-5677242f432102dea9e6eceec1dc089e2f709ca4.tar.bz2
[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/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index cad664b..cf766ad 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1251,7 +1251,8 @@ out:
}
int inet_ctl_sock_create(struct sock **sk, unsigned short family,
- unsigned short type, unsigned char protocol)
+ unsigned short type, unsigned char protocol,
+ struct net *net)
{
struct socket *sock;
int rc = sock_create_kern(family, type, protocol, &sock);
@@ -1265,6 +1266,8 @@ int inet_ctl_sock_create(struct sock **sk, unsigned short family,
* we do not wish this socket to see incoming packets.
*/
(*sk)->sk_prot->unhash(*sk);
+
+ sk_change_net(*sk, net);
}
return rc;
}