summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-03 00:04:28 (GMT)
committerDavid S. Miller <davem@davemloft.net>2015-05-04 04:13:16 (GMT)
commit2e70aedd3d522b018c01df172cd213a8a75e2d55 (patch)
tree1b9d5ffb69afadab90c88ef00f50ebe949155b9d /net/core
parentbd4d95a5c9b2973d51934b830e1aa4ebf84645e6 (diff)
downloadlinux-2e70aedd3d522b018c01df172cd213a8a75e2d55.tar.xz
Revert "net: kernel socket should be released in init_net namespace"
This reverts commit c243d7e20996254f89c28d4838b5feca735c030d. That patch is solving a non-existant problem while creating a real problem. Just because a socket is allocated in the init name space doesn't mean that it gets hashed in the init name space. When we unhash it the name space must be the same as the one we had when we hashed it. So this patch is completely bogus and causes socket leaks. Reported-by: Andrey Wagin <avagin@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index e891bcf..292f422 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1474,8 +1474,8 @@ void sk_release_kernel(struct sock *sk)
return;
sock_hold(sk);
- sock_net_set(sk, get_net(&init_net));
sock_release(sk->sk_socket);
+ sock_net_set(sk, get_net(&init_net));
sock_put(sk);
}
EXPORT_SYMBOL(sk_release_kernel);