mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
inet: fix request sock refcounting
While testing last patch series, I found req sock refcounting was wrong.
We must set skc_refcnt to 1 for all request socks added in hashes,
but also on request sockets created by FastOpen or syncookies.
It is tricky because we need to defer this initialization so that
future RCU lookups do not try to take a refcount on a not yet
fully initialized request socket.
Also get rid of ireq_refcnt alias.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 13854e5a60
("inet: add proper refcounting to request sock")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e3d95ad7da
commit
0470c8ca1d
7 changed files with 22 additions and 18 deletions
|
@ -169,6 +169,7 @@ static bool tcp_fastopen_create_child(struct sock *sk,
|
|||
inet_csk_reset_xmit_timer(child, ICSK_TIME_RETRANS,
|
||||
TCP_TIMEOUT_INIT, TCP_RTO_MAX);
|
||||
|
||||
atomic_set(&req->rsk_refcnt, 1);
|
||||
/* Add the child socket directly into the accept queue */
|
||||
inet_csk_reqsk_queue_add(sk, req, child);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue