Skip to content

Commit 8d0f9a6

Browse files
paulmckrcuurezki
authored andcommitted
rcutorture: Remove extraneous rcu_torture_pipe_update_one() READ_ONCE()
The rcu_torture_pipe_update_one() cannot run concurrently with any updates of ->rtort_pipe_count, so this commit removes the extraneous READ_ONCE() from the read from this field. Reported-by: Linus Torvalds <[email protected]> Closes: https://lore.kernel.org/lkml/CAHk-=wiX_zF5Mpt8kUm_LFQpYY-mshrXJPOe+wKNwiVhEUcU9g@mail.gmail.com/ Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Joel Fernandes (Google) <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
1 parent c507e19 commit 8d0f9a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ rcu_torture_pipe_update_one(struct rcu_torture *rp)
461461
WRITE_ONCE(rp->rtort_chkp, NULL);
462462
smp_store_release(&rtrcp->rtc_ready, 1); // Pair with smp_load_acquire().
463463
}
464-
i = READ_ONCE(rp->rtort_pipe_count);
464+
i = rp->rtort_pipe_count;
465465
if (i > RCU_TORTURE_PIPE_LEN)
466466
i = RCU_TORTURE_PIPE_LEN;
467467
atomic_inc(&rcu_torture_wcount[i]);

0 commit comments

Comments
 (0)