From 5677242f432102dea9e6eceec1dc089e2f709ca4 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Thu, 3 Apr 2008 14:28:30 -0700 Subject: [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 Acked-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- include/net/inet_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/net/inet_common.h') diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 4bfcf3f3555f..18c773286b91 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h @@ -42,7 +42,13 @@ extern int inet_ioctl(struct socket *sock, extern int inet_ctl_sock_create(struct sock **sk, unsigned short family, unsigned short type, - unsigned char protocol); + unsigned char protocol, + struct net *net); + +static inline void inet_ctl_sock_destroy(struct sock *sk) +{ + sk_release_kernel(sk); +} #endif -- cgit v1.2.3-59-g8ed1b