[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADVnQy=D7dFCS3ZtQNQsNBuz+6GDsq3NBy=b1BYXQA7E=YyTCA@mail.gmail.com>
Date: Fri, 22 Aug 2025 09:22:12 -0400
From: Neal Cardwell <ncardwell@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Kuniyuki Iwashima <kuniyu@...gle.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next 2/2] tcp: annotate data-races around icsk->icsk_probes_out
On Fri, Aug 22, 2025 at 5:17 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> icsk->icsk_probes_out is read locklessly from inet_sk_diag_fill(),
> get_tcp4_sock() and get_tcp6_sock().
>
> Add corresponding READ_ONCE()/WRITE_ONCE() annotations.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> + WRITE_ONCE(icsk->icsk_probes_out, icsk->icsk_probes_out + 1);
> + WRITE_ONCE(icsk->icsk_probes_out, icsk->icsk_probes_out + 1);
Do we want a READ_ONCE as well for those 2 cases? Like:
WRITE_ONCE(icsk->icsk_probes_out, READ_ONCE (icsk->icsk_probes_out) + 1);
Perhaps it's not strictly necessary, though I see several places in
the code base that use this approach for increments...
neal
Powered by blists - more mailing lists