Thread (4 messages) 4 messages, 4 authors, 2023-10-01

Re: [PATCH net] net: fix possible store tearing in neigh_periodic_work()

flat view

From: Simon Horman <horms@kernel.org>
Date: 2023-09-22 09:49:46

On Thu, Sep 21, 2023 at 08:46:26AM +0000, 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 <redacted>
Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help