diff options
| author | Eric Dumazet <edumazet@google.com> | 2025-06-20 15:55:36 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-06-23 17:05:12 -0700 |
| commit | 935b67675a9f233aa4ac4ae6452b2cc45418d839 (patch) | |
| tree | e20347e07374de053e0dac18a6d49364a8823660 /net/x25 | |
| parent | 3169e36ae14802b01abe4bfa7ec593b0a1af5cc7 (diff) | |
net: make sk->sk_rcvtimeo lockless
Followup of commit 285975dd6742 ("net: annotate data-races around
sk->sk_{rcv|snd}timeo").
Remove lock_sock()/release_sock() from ksmbd_tcp_rcv_timeout()
and add READ_ONCE()/WRITE_ONCE() where it is needed.
Also SO_RCVTIMEO_OLD and SO_RCVTIMEO_NEW can call sock_set_timeout()
without holding the socket lock.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250620155536.335520-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/x25')
| -rw-r--r-- | net/x25/af_x25.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 1f8ae9f4a3f1..655d1e0ae25f 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -891,7 +891,7 @@ static int x25_accept(struct socket *sock, struct socket *newsock, if (sk->sk_state != TCP_LISTEN) goto out2; - rc = x25_wait_for_data(sk, sk->sk_rcvtimeo); + rc = x25_wait_for_data(sk, READ_ONCE(sk->sk_rcvtimeo)); if (rc) goto out2; skb = skb_dequeue(&sk->sk_receive_queue); |