summaryrefslogtreecommitdiff
path: root/net/smc
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 18:03:15 +0300
committerDavid S. Miller <davem@davemloft.net>2023-07-29 20:13:41 +0300
commit3c5b4d69c358a9275a8de98f87caf6eda644b086 (patch)
treefa45713da2bb8c9dc9c4728dcdb990ebd86c98d5 /net/smc
parentb4b553253091cafe9ec38994acf42795e073bef5 (diff)
downloadlinux-3c5b4d69c358a9275a8de98f87caf6eda644b086.tar.xz
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/smc')
-rw-r--r--net/smc/af_smc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index a7f887d91d89..0c013d2b5d8f 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -445,7 +445,7 @@ static void smc_copy_sock_settings(struct sock *nsk, struct sock *osk,
nsk->sk_rcvbuf = osk->sk_rcvbuf;
nsk->sk_sndtimeo = osk->sk_sndtimeo;
nsk->sk_rcvtimeo = osk->sk_rcvtimeo;
- nsk->sk_mark = osk->sk_mark;
+ nsk->sk_mark = READ_ONCE(osk->sk_mark);
nsk->sk_priority = osk->sk_priority;
nsk->sk_rcvlowat = osk->sk_rcvlowat;
nsk->sk_bound_dev_if = osk->sk_bound_dev_if;