diff options
| author | Eric Dumazet <edumazet@google.com> | 2023-07-28 15:03:15 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 12:08:14 +0200 |
| commit | b53468041d20177c8b8808d1891c0145718ceadf (patch) | |
| tree | d2af7b8b8f9b9271e738df72a7bfabb3f33461b3 /net/dccp | |
| parent | c7bb6860645f83134842e27a2fd1c1449edc5d80 (diff) | |
| download | linux-b53468041d20177c8b8808d1891c0145718ceadf.tar.gz linux-b53468041d20177c8b8808d1891c0145718ceadf.tar.bz2 linux-b53468041d20177c8b8808d1891c0145718ceadf.zip | |
net: annotate data-races around sk->sk_mark
[ Upstream commit 3c5b4d69c358a9275a8de98f87caf6eda644b086 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 c0fd8f5f3b94..b51ce6f8ceba 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -237,8 +237,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); } |
