diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-03 02:04:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-04 06:13:16 +0200 |
commit | 2e70aedd3d522b018c01df172cd213a8a75e2d55 (patch) | |
tree | 1b9d5ffb69afadab90c88ef00f50ebe949155b9d /net | |
parent | Merge branch 'dev_kfree_skb' (diff) | |
download | linux-2e70aedd3d522b018c01df172cd213a8a75e2d55.tar.xz linux-2e70aedd3d522b018c01df172cd213a8a75e2d55.zip |
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')
-rw-r--r-- | net/core/sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index e891bcf325ca..292f42228bfb 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); |