public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org,  Eelco Chaudron <echaudro@redhat.com>,
	 Ilya Maximets <i.maximets@ovn.org>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Simon Horman <horms@kernel.org>,
	wangchuanlei <wangchuanlei@inspur.com>,
	 dev@openvswitch.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] net: openvswitch: fix data race in ovs_vport_get_upcall_stats
Date: Wed, 21 Jan 2026 08:54:50 -0500	[thread overview]
Message-ID: <f7tzf67vzo5.fsf@redhat.com> (raw)
In-Reply-To: <20260121072932.2360971-1-mmyangfl@gmail.com> (David Yang's message of "Wed, 21 Jan 2026 15:29:26 +0800")

David Yang <mmyangfl@gmail.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@gmail.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@redhat.com>


  parent reply	other threads:[~2026-01-21 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21  7:29 [PATCH net v2] net: openvswitch: fix data race in ovs_vport_get_upcall_stats David Yang
2026-01-21 13:27 ` Ilya Maximets
2026-01-21 13:29 ` Eric Dumazet
2026-01-21 13:54 ` Aaron Conole [this message]
2026-01-22 12:00 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7tzf67vzo5.fsf@redhat.com \
    --to=aconole@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=echaudro@redhat.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=i.maximets@ovn.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wangchuanlei@inspur.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox