summaryrefslogtreecommitdiff
path: root/net/l2tp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 15:03:15 +0000
committerDavid S. Miller <davem@davemloft.net>2023-07-29 18:13:41 +0100
commit3c5b4d69c358a9275a8de98f87caf6eda644b086 (patch)
treefa45713da2bb8c9dc9c4728dcdb990ebd86c98d5 /net/l2tp
parentb4b553253091cafe9ec38994acf42795e073bef5 (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/l2tp')
-rw-r--r--net/l2tp/l2tp_ip6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index b1623f9c4f92..ff78217f0cb1 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -519,7 +519,7 @@ static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
/* Get and verify the address */
memset(&fl6, 0, sizeof(fl6));
- fl6.flowi6_mark = sk->sk_mark;
+ fl6.flowi6_mark = READ_ONCE(sk->sk_mark);
fl6.flowi6_uid = sk->sk_uid;
ipcm6_init(&ipc6);