diff options
| author | Eric Dumazet <edumazet@google.com> | 2025-06-30 12:19:25 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-02 14:32:29 -0700 |
| commit | 8a402bbe54760dea67f1b2980c727761b47994d7 (patch) | |
| tree | b478ead62258f97c29228298a2cf109e5bfc222f /net/core/sock.c | |
| parent | 8077b9a911d7cb0f606217f645d82c7b083ca238 (diff) | |
net: dst: annotate data-races around dst->obsolete
(dst_entry)->obsolete is read locklessly, add corresponding
annotations.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250630121934.3399505-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/sock.c')
| -rw-r--r-- | net/core/sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 3a71d6c4ccf0..dc59fb7760a3 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -602,7 +602,7 @@ struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk); - if (dst && dst->obsolete && + if (dst && READ_ONCE(dst->obsolete) && INDIRECT_CALL_INET(dst->ops->check, ip6_dst_check, ipv4_dst_check, dst, cookie) == NULL) { sk_tx_queue_clear(sk); @@ -620,7 +620,7 @@ struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = sk_dst_get(sk); - if (dst && dst->obsolete && + if (dst && READ_ONCE(dst->obsolete) && INDIRECT_CALL_INET(dst->ops->check, ip6_dst_check, ipv4_dst_check, dst, cookie) == NULL) { sk_dst_reset(sk); |