netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
	Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: Re: [PATCH net 5/6] tcp_metrics: annotate data-races around tm->tcpm_net
Date: Wed, 2 Aug 2023 09:12:24 -0600	[thread overview]
Message-ID: <82c025b3-f3b7-cfd7-6bab-a246238129b6@kernel.org> (raw)
In-Reply-To: <20230802131500.1478140-6-edumazet@google.com>

On 8/2/23 7:14 AM, Eric Dumazet wrote:
> tm->tcpm_net can be read or written locklessly.
> 
> Instead of changing write_pnet() and read_pnet() and potentially
> hurt performance, add the needed READ_ONCE()/WRITE_ONCE()
> in tm_net() and tcpm_new().
> 
> Fixes: 849e8a0ca8d5 ("tcp_metrics: Add a field tcpm_net and verify it matches on lookup")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/ipv4/tcp_metrics.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2023-08-02 15:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 13:14 [PATCH net 0/6] tcp_metrics: series of fixes Eric Dumazet
2023-08-02 13:14 ` [PATCH net 1/6] tcp_metrics: fix addr_same() helper Eric Dumazet
2023-08-02 15:04   ` David Ahern
2023-08-02 17:26   ` Kuniyuki Iwashima
2023-08-02 13:14 ` [PATCH net 2/6] tcp_metrics: annotate data-races around tm->tcpm_stamp Eric Dumazet
2023-08-02 15:06   ` David Ahern
2023-08-02 17:30   ` Kuniyuki Iwashima
2023-08-02 13:14 ` [PATCH net 3/6] tcp_metrics: annotate data-races around tm->tcpm_lock Eric Dumazet
2023-08-02 15:07   ` David Ahern
2023-08-02 17:35   ` Kuniyuki Iwashima
2023-08-02 13:14 ` [PATCH net 4/6] tcp_metrics: annotate data-races around tm->tcpm_vals[] Eric Dumazet
2023-08-02 15:09   ` David Ahern
2023-08-02 17:37   ` Kuniyuki Iwashima
2023-08-02 13:14 ` [PATCH net 5/6] tcp_metrics: annotate data-races around tm->tcpm_net Eric Dumazet
2023-08-02 15:12   ` David Ahern [this message]
2023-08-02 17:42   ` Kuniyuki Iwashima
2023-08-02 13:15 ` [PATCH net 6/6] tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen Eric Dumazet
2023-08-02 17:47   ` Kuniyuki Iwashima
2023-08-03 18:10 ` [PATCH net 0/6] tcp_metrics: series of fixes 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=82c025b3-f3b7-cfd7-6bab-a246238129b6@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).