[PATCH] rcu: Use READ_ONCE() for rdp->gpwrap access in __note_gp_changes()

2024-11-04 Thread Zilin Guan
t;gp_seq_needed, rnp->gp_seq_needed) || rdp->gpwrap) 1306WRITE_ONCE(rdp->gp_seq_needed, rnp->gp_seq_needed); In the same environment, reads in two places should have the same protection. Signed-off-by: Zilin Guan --- kernel/rcu/tree.c | 2 +- 1 file cha

[PATCH v2] rcu: Remove READ_ONCE() for rdp->gpwrap access in __note_gp_changes()

2024-11-10 Thread Zilin Guan
is unnecessary. Signed-off-by: Zilin Guan --- v1 -> v2: Remove READ_ONCE() from accesses to rdp->gpwrap. kernel/rcu/tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 77b5b39e19a8..68eb0f746575 100644 --- a/kernel/rc

Re: [PATCH] rcu: Use READ_ONCE() for rdp->gpwrap access in __note_gp_changes()

2024-11-07 Thread Zilin Guan
On Wed, Nov 06, 2024 at 12:18:25PM -0800, Paul E. McKenney wrote: > Good eyes!!! > > But did you find this with KCSAN, or by visual inspection? > > The reason that I ask is that the __note_gp_changes() should be > invoked with the leaf rnp->lock held, which should exclude writes to > the rdp->gpw