net: do not call sock_put() on TIMEWAIT sockets
[ Upstream commit 80ad1d61e72d626e30ebe8529a0455e660ca4693 ]
commit 3ab5aee7fe ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d8ac0f178f
commit
53d384ae6a
@@ -287,7 +287,7 @@ begintw:
|
||||
if (unlikely(!INET_TW_MATCH(sk, net, acookie,
|
||||
saddr, daddr, ports,
|
||||
dif))) {
|
||||
sock_put(sk);
|
||||
inet_twsk_put(inet_twsk(sk));
|
||||
goto begintw;
|
||||
}
|
||||
goto out;
|
||||
|
||||
@@ -116,7 +116,7 @@ begintw:
|
||||
}
|
||||
if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr,
|
||||
ports, dif))) {
|
||||
sock_put(sk);
|
||||
inet_twsk_put(inet_twsk(sk));
|
||||
goto begintw;
|
||||
}
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user