summaryrefslogtreecommitdiffstats
path: root/net/xdp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 17:03:15 +0200
committerDavid S. Miller <davem@davemloft.net>2023-07-29 19:13:41 +0200
commit3c5b4d69c358a9275a8de98f87caf6eda644b086 (patch)
treefa45713da2bb8c9dc9c4728dcdb990ebd86c98d5 /net/xdp
parentnet: add missing READ_ONCE(sk->sk_rcvbuf) annotation (diff)
downloadlinux-3c5b4d69c358a9275a8de98f87caf6eda644b086.tar.xz
linux-3c5b4d69c358a9275a8de98f87caf6eda644b086.zip
net: annotate data-races around sk->sk_mark
sk->sk_mark is often read while another thread could change the value. Fixes: 4a19ec5800fc ("[NET]: Introducing socket mark socket option.") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xdp')
-rw-r--r--net/xdp/xsk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 31dca4ecb2c5..b89adb52a977 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -505,7 +505,7 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs,
skb->dev = dev;
skb->priority = xs->sk.sk_priority;
- skb->mark = xs->sk.sk_mark;
+ skb->mark = READ_ONCE(xs->sk.sk_mark);
skb_shinfo(skb)->destructor_arg = (void *)(long)desc->addr;
skb->destructor = xsk_destruct_skb;