summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-07-28 15:03:12 +0000
committerDavid S. Miller <davem@davemloft.net>2023-07-29 18:13:41 +0100
commit285975dd674258ccb33e77a1803e8f2015e67105 (patch)
treef7a2ba431a1d454a0bc3440efb4cbad46959058e /net/sched
parente6d12bdb435d23ff6c1890c852d85408a2f496ee (diff)
downloadlinux-285975dd674258ccb33e77a1803e8f2015e67105.tar.gz
linux-285975dd674258ccb33e77a1803e8f2015e67105.tar.bz2
linux-285975dd674258ccb33e77a1803e8f2015e67105.zip
net: annotate data-races around sk->sk_{rcv|snd}timeo
sk_getsockopt() runs without locks, we must add annotations to sk->sk_rcvtimeo and sk->sk_sndtimeo. In the future we might allow fetching these fields before we lock the socket in TCP fast path. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/em_meta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index af85a73c4c54..6fdba069f6bf 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -568,7 +568,7 @@ META_COLLECTOR(int_sk_rcvtimeo)
*err = -1;
return;
}
- dst->value = sk->sk_rcvtimeo / HZ;
+ dst->value = READ_ONCE(sk->sk_rcvtimeo) / HZ;
}
META_COLLECTOR(int_sk_sndtimeo)
@@ -579,7 +579,7 @@ META_COLLECTOR(int_sk_sndtimeo)
*err = -1;
return;
}
- dst->value = sk->sk_sndtimeo / HZ;
+ dst->value = READ_ONCE(sk->sk_sndtimeo) / HZ;
}
META_COLLECTOR(int_sk_sendmsg_off)