net: make sk->sk_rcvtimeo lockless
authorEric Dumazet <edumazet@google.com>
Fri, 20 Jun 2025 15:55:36 +0000 (15:55 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Jun 2025 00:05:12 +0000 (17:05 -0700)
commit935b67675a9f233aa4ac4ae6452b2cc45418d839
treee20347e07374de053e0dac18a6d49364a8823660
parent3169e36ae14802b01abe4bfa7ec593b0a1af5cc7
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>
fs/smb/server/transport_tcp.c
include/net/sock.h
net/core/sock.c
net/llc/af_llc.c
net/sctp/socket.c
net/smc/af_smc.c
net/smc/smc_clc.c
net/strparser/strparser.c
net/x25/af_x25.c