mirror-linux/net/openvswitch
David Yang cc4816bdb0 net: openvswitch: fix data race in ovs_vport_get_upcall_stats
In ovs_vport_get_upcall_stats(), some statistics protected by
u64_stats_sync, are read and accumulated in ignorance of possible
u64_stats_fetch_retry() events. These statistics are already accumulated
by u64_stats_inc(). Fix this by reading them into temporary variables
first.

Fixes: 1933ea365a ("net: openvswitch: Add support to count upcall packets")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Acked-by: Ilya Maximets <i.maximets@ovn.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Link: https://patch.msgid.link/20260121072932.2360971-1-mmyangfl@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-01-22 12:55:22 +01:00
..
Kconfig sctp: use skb_crc32c() instead of __skb_checksum() 2025-05-21 15:40:16 -07:00
Makefile
actions.c net: openvswitch: remove never-working support for setting nsh fields 2025-11-14 18:13:24 -08:00
conntrack.c netfilter: nf_conncount: rework API to use sk_buff directly 2025-11-28 00:05:49 +00:00
conntrack.h
datapath.c net: openvswitch: allow providing upcall pid for the 'execute' command 2025-07-07 14:30:39 -07:00
datapath.h net: openvswitch: allow providing upcall pid for the 'execute' command 2025-07-07 14:30:39 -07:00
dp_notify.c net: replace use of system_wq with system_percpu_wq 2025-09-22 17:40:30 -07:00
drop.h
flow.c net: openvswitch: Use for_each_cpu() where appropriate 2025-08-20 19:47:22 -07:00
flow.h
flow_netlink.c net: openvswitch: fix middle attribute validation in push_nsh() action 2025-12-10 00:46:55 -08:00
flow_netlink.h net: openvswitch: remove never-working support for setting nsh fields 2025-11-14 18:13:24 -08:00
flow_table.c net: openvswitch: Use for_each_cpu() where appropriate 2025-08-20 19:47:22 -07:00
flow_table.h net: openvswitch: Annotate struct mask_array with __counted_by 2023-10-17 13:56:03 +02:00
meter.c
meter.h net: openvswitch: remove unnecessary linux/genetlink.h include 2024-04-01 21:44:34 -07:00
openvswitch_trace.c
openvswitch_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
vport-geneve.c
vport-gre.c
vport-internal_dev.c net: rename netns_local to netns_immutable 2025-03-04 12:44:48 +01:00
vport-internal_dev.h
vport-netdev.c net: openvswitch: Avoid needlessly taking the RTNL on vport destroy 2025-12-22 12:25:11 +01:00
vport-netdev.h
vport-vxlan.c
vport.c net: openvswitch: fix data race in ovs_vport_get_upcall_stats 2026-01-22 12:55:22 +01:00
vport.h net: openvswitch: fix kernel-doc warnings in internal headers 2025-03-24 09:30:21 -07:00