diff options
author | Eric Dumazet <edumazet@google.com> | 2013-10-02 00:04:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 17:05:54 -0400 |
commit | 80ad1d61e72d626e30ebe8529a0455e660ca4693 (patch) | |
tree | e2d0a072268d9522e94eaed272544a2732e77ee1 | |
parent | 28ad7b06f4a7670d5794d3751f5c68a7e5e437a8 (diff) |
net: do not call sock_put() on TIMEWAIT sockets
commit 3ab5aee7fe84 ("net: Convert TCP & DCCP hash tables to use RCU /
hlist_nulls") incorrectly used sock_put() on TIMEWAIT sockets.
We should instead use inet_twsk_put()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/inet_hashtables.c | 2 | ||||
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 7bd8983dbfcf..96da9c77deca 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c | |||
@@ -287,7 +287,7 @@ begintw: | |||
287 | if (unlikely(!INET_TW_MATCH(sk, net, acookie, | 287 | if (unlikely(!INET_TW_MATCH(sk, net, acookie, |
288 | saddr, daddr, ports, | 288 | saddr, daddr, ports, |
289 | dif))) { | 289 | dif))) { |
290 | sock_put(sk); | 290 | inet_twsk_put(inet_twsk(sk)); |
291 | goto begintw; | 291 | goto begintw; |
292 | } | 292 | } |
293 | goto out; | 293 | goto out; |
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 32b4a1675d82..066640e0ba8e 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -116,7 +116,7 @@ begintw: | |||
116 | } | 116 | } |
117 | if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr, | 117 | if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr, |
118 | ports, dif))) { | 118 | ports, dif))) { |
119 | sock_put(sk); | 119 | inet_twsk_put(inet_twsk(sk)); |
120 | goto begintw; | 120 | goto begintw; |
121 | } | 121 | } |
122 | goto out; | 122 | goto out; |