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/xfrm | |
| parent | Merge branch 'net-introduce-net_aligned_data' (diff) | |
| download | linux-8a402bbe54760dea67f1b2980c727761b47994d7.tar.gz linux-8a402bbe54760dea67f1b2980c727761b47994d7.zip | |
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/xfrm')
| -rw-r--r-- | net/xfrm/xfrm_policy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 094d2454602e..c5035a9bc3bb 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -3925,7 +3925,7 @@ static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie) * This will force stale_bundle() to fail on any xdst bundle with * this dst linked in it. */ - if (dst->obsolete < 0 && !stale_bundle(dst)) + if (READ_ONCE(dst->obsolete) < 0 && !stale_bundle(dst)) return dst; return NULL; @@ -3953,7 +3953,7 @@ static void xfrm_link_failure(struct sk_buff *skb) static void xfrm_negative_advice(struct sock *sk, struct dst_entry *dst) { - if (dst->obsolete) + if (READ_ONCE(dst->obsolete)) sk_dst_reset(sk); } |
