diff options
author | Eric Dumazet <edumazet@google.com> | 2023-07-28 17:03:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-29 19:13:41 +0200 |
commit | 3c5b4d69c358a9275a8de98f87caf6eda644b086 (patch) | |
tree | fa45713da2bb8c9dc9c4728dcdb990ebd86c98d5 /include/net/ip.h | |
parent | net: add missing READ_ONCE(sk->sk_rcvbuf) annotation (diff) | |
download | linux-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 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 50d435855ae2..332521170d9b 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -93,7 +93,7 @@ static inline void ipcm_init_sk(struct ipcm_cookie *ipcm, { ipcm_init(ipcm); - ipcm->sockc.mark = inet->sk.sk_mark; + ipcm->sockc.mark = READ_ONCE(inet->sk.sk_mark); ipcm->sockc.tsflags = inet->sk.sk_tsflags; ipcm->oif = READ_ONCE(inet->sk.sk_bound_dev_if); ipcm->addr = inet->inet_saddr; |