diff options
author | Eric Dumazet <edumazet@google.com> | 2023-07-28 15:03:15 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-29 18:13:41 +0100 |
commit | 3c5b4d69c358a9275a8de98f87caf6eda644b086 (patch) | |
tree | fa45713da2bb8c9dc9c4728dcdb990ebd86c98d5 /net/dccp | |
parent | b4b553253091cafe9ec38994acf42795e073bef5 (diff) |
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/dccp')
-rw-r--r-- | net/dccp/ipv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 7249ef218178..d29d1163203d 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -238,8 +238,8 @@ static int dccp_v6_send_response(const struct sock *sk, struct request_sock *req opt = ireq->ipv6_opt; if (!opt) opt = rcu_dereference(np->opt); - err = ip6_xmit(sk, skb, &fl6, sk->sk_mark, opt, np->tclass, - sk->sk_priority); + err = ip6_xmit(sk, skb, &fl6, READ_ONCE(sk->sk_mark), opt, + np->tclass, sk->sk_priority); rcu_read_unlock(); err = net_xmit_eval(err); } |