[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f7tzf67vzo5.fsf@redhat.com>
Date: Wed, 21 Jan 2026 08:54:50 -0500
From: Aaron Conole <aconole@...hat.com>
To: David Yang <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org, Eelco Chaudron <echaudro@...hat.com>, Ilya
Maximets <i.maximets@....org>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
wangchuanlei <wangchuanlei@...pur.com>, dev@...nvswitch.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: openvswitch: fix data race in
ovs_vport_get_upcall_stats
David Yang <mmyangfl@...il.com> writes:
> 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: 1933ea365aa7 ("net: openvswitch: Add support to count upcall packets")
> Signed-off-by: David Yang <mmyangfl@...il.com>
> ---
> v1: https://lore.kernel.org/r/20260119181339.1847451-1-mmyangfl@gmail.com
> - use u64 instead of __u64
> net/openvswitch/vport.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
Thanks for the patch - I did a spot-check of the rest of the module with
the following:
~/git/linux/net/openvswitch$ grep -nr 'while\(.*fetch.*\)'
and didn't find any other places that seemed to duplicate this
mistaken read pattern (at least in the OVS kernel module).
Reviewed-by: Aaron Conole <aconole@...hat.com>
Powered by blists - more mailing lists