summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-06-23 17:05:14 -0700
committerJakub Kicinski <kuba@kernel.org>2025-06-23 17:05:15 -0700
commit2f70ba1c0bf04349182ae209c8c69e1b71d4c0a8 (patch)
treee20347e07374de053e0dac18a6d49364a8823660 /include
parent0fd9e5958ebb41188700b566467a1d9a3ebcdece (diff)
parent935b67675a9f233aa4ac4ae6452b2cc45418d839 (diff)
Merge branch 'net-lockless-sk_sndtimeo-and-sk_rcvtimeo'
Eric Dumazet says: ==================== net: lockless sk_sndtimeo and sk_rcvtimeo This series completes the task of making sk->sk_sndtimeo and sk->sk_rcvtimeo lockless. ==================== Link: https://patch.msgid.link/20250620155536.335520-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index bbd97fbc5935..0f2443d4ec58 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2596,12 +2596,12 @@ static inline gfp_t gfp_memcg_charge(void)
static inline long sock_rcvtimeo(const struct sock *sk, bool noblock)
{
- return noblock ? 0 : sk->sk_rcvtimeo;
+ return noblock ? 0 : READ_ONCE(sk->sk_rcvtimeo);
}
static inline long sock_sndtimeo(const struct sock *sk, bool noblock)
{
- return noblock ? 0 : sk->sk_sndtimeo;
+ return noblock ? 0 : READ_ONCE(sk->sk_sndtimeo);
}
static inline int sock_rcvlowat(const struct sock *sk, int waitall, int len)