aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/core/net-procfs.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-04-07 16:36:01 +0000
committerJakub Kicinski <kuba@kernel.org>2025-04-08 12:30:55 -0700
commit22d046a778e4344437fd49bb0995e315ec3fddcf (patch)
tree13c07e09869805f2ec83a6851190962de5f94dce /net/core/net-procfs.c
parentnet: rps: annotate data-races around (struct sd_flow_limit)->count (diff)
downloadwireguard-linux-22d046a778e4344437fd49bb0995e315ec3fddcf.tar.xz
wireguard-linux-22d046a778e4344437fd49bb0995e315ec3fddcf.zip
net: add data-race annotations in softnet_seq_show()
softnet_seq_show() reads several fields that might be updated concurrently. Add READ_ONCE() and WRITE_ONCE() annotations. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250407163602.170356-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r--net/core/net-procfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
index 69782d62fbe1..4f0f0709a1cb 100644
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
@@ -145,11 +145,11 @@ static int softnet_seq_show(struct seq_file *seq, void *v)
seq_printf(seq,
"%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x "
"%08x %08x\n",
- sd->processed, atomic_read(&sd->dropped),
- sd->time_squeeze, 0,
+ READ_ONCE(sd->processed), atomic_read(&sd->dropped),
+ READ_ONCE(sd->time_squeeze), 0,
0, 0, 0, 0, /* was fastroute */
0, /* was cpu_collision */
- sd->received_rps, flow_limit_count,
+ READ_ONCE(sd->received_rps), flow_limit_count,
input_qlen + process_qlen, (int)seq->index,
input_qlen, process_qlen);
return 0;