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, Simon Horman <horms@kernel.org>,
	eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] inet: ipmr: fix data-races
Date: Mon, 13 Jan 2025 17:35:40 -0700	[thread overview]
Message-ID: <0543159a-addf-485f-8806-c6e56705ee28@kernel.org> (raw)
In-Reply-To: <20250113171509.3491883-1-edumazet@google.com>

On 1/13/25 10:15 AM, Eric Dumazet wrote:
> Following fields of 'struct mr_mfc' can be updated
> concurrently (no lock protection) from ip_mr_forward()
> and ip6_mr_forward()
> 
> - bytes
> - pkt
> - wrong_if
> - lastuse
> 
> They also can be read from other functions.
> 
> Convert bytes, pkt and wrong_if to atomic_long_t,
> and use READ_ONCE()/WRITE_ONCE() for lastuse.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  include/linux/mroute_base.h |  6 +++---
>  net/ipv4/ipmr.c             | 28 ++++++++++++++--------------
>  net/ipv4/ipmr_base.c        |  6 +++---
>  net/ipv6/ip6mr.c            | 28 ++++++++++++++--------------
>  4 files changed, 34 insertions(+), 34 deletions(-)
> 

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



  reply	other threads:[~2025-01-14  0:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 17:15 [PATCH net-next] inet: ipmr: fix data-races Eric Dumazet
2025-01-14  0:35 ` David Ahern [this message]
2025-01-14 21:36 ` Jakub Kicinski
2025-01-14 21:59   ` Eric Dumazet

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=0543159a-addf-485f-8806-c6e56705ee28@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --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).