diff options
author | Christoph Paasch <christoph.paasch@uclouvain.be> | 2012-09-18 10:19:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-20 17:12:27 -0400 |
commit | bb68b64724a4fd6b93d83b39aeffa4aadb2562fc (patch) | |
tree | ed1e4a45bc924fb064d36b6ec12359eab19aa875 /net/ipv4 | |
parent | 9baa0b0364103dd726384c71db30b74044754743 (diff) |
ipv4: Don't add TCP-code in inet_sock_destruct
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Acked-by: H.K. Jerry Chu <hkchu@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/af_inet.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 845372b025f6..766c59658563 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -149,8 +149,6 @@ void inet_sock_destruct(struct sock *sk) | |||
149 | pr_err("Attempt to release alive inet socket %p\n", sk); | 149 | pr_err("Attempt to release alive inet socket %p\n", sk); |
150 | return; | 150 | return; |
151 | } | 151 | } |
152 | if (sk->sk_protocol == IPPROTO_TCP) | ||
153 | kfree(inet_csk(sk)->icsk_accept_queue.fastopenq); | ||
154 | 152 | ||
155 | WARN_ON(atomic_read(&sk->sk_rmem_alloc)); | 153 | WARN_ON(atomic_read(&sk->sk_rmem_alloc)); |
156 | WARN_ON(atomic_read(&sk->sk_wmem_alloc)); | 154 | WARN_ON(atomic_read(&sk->sk_wmem_alloc)); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index df83d744e380..7b1e940393cf 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2325,6 +2325,13 @@ int tcp_disconnect(struct sock *sk, int flags) | |||
2325 | } | 2325 | } |
2326 | EXPORT_SYMBOL(tcp_disconnect); | 2326 | EXPORT_SYMBOL(tcp_disconnect); |
2327 | 2327 | ||
2328 | void tcp_sock_destruct(struct sock *sk) | ||
2329 | { | ||
2330 | inet_sock_destruct(sk); | ||
2331 | |||
2332 | kfree(inet_csk(sk)->icsk_accept_queue.fastopenq); | ||
2333 | } | ||
2334 | |||
2328 | static inline bool tcp_can_repair_sock(const struct sock *sk) | 2335 | static inline bool tcp_can_repair_sock(const struct sock *sk) |
2329 | { | 2336 | { |
2330 | return capable(CAP_NET_ADMIN) && | 2337 | return capable(CAP_NET_ADMIN) && |