提交 80ad1d61 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 28ad7b06
......@@ -287,7 +287,7 @@ struct sock *__inet_lookup_established(struct net *net,
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 @@ struct sock *__inet6_lookup_established(struct net *net,
}
if (unlikely(!INET6_TW_MATCH(sk, net, saddr, daddr,
ports, dif))) {
sock_put(sk);
inet_twsk_put(inet_twsk(sk));
goto begintw;
}
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册