[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0543159a-addf-485f-8806-c6e56705ee28@kernel.org>
Date: Mon, 13 Jan 2025 17:35:40 -0700
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, Simon Horman <horms@...nel.org>,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next] inet: ipmr: fix data-races
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@...gle.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@...nel.org>
Powered by blists - more mailing lists