Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80ad1d61 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: do not call sock_put() on TIMEWAIT sockets



commit 3ab5aee7 ("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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 28ad7b06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;