[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <876b1ab4-2f28-943e-b85d-e196f46b3138@kernel.org>
Date: Thu, 21 Sep 2023 13:33:01 -0600
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, eric.dumazet@...il.com
Subject: Re: [PATCH net] net: fix possible store tearing in
neigh_periodic_work()
On 9/21/23 2:46 AM, Eric Dumazet wrote:
> While looking at a related syzbot report involving neigh_periodic_work(),
> I found that I forgot to add an annotation when deleting an
> RCU protected item from a list.
>
> Readers use rcu_deference(*np), we need to use either
> rcu_assign_pointer() or WRITE_ONCE() on writer side
> to prevent store tearing.
>
> I use rcu_assign_pointer() to have lockdep support,
> this was the choice made in neigh_flush_dev().
>
> Fixes: 767e97e1e0db ("neigh: RCU conversion of struct neighbour")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
> net/core/neighbour.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists