Re: [PATCH] rcu: avoid data-race in rcu_gp_fqs_check_wake()

2019-10-09 Thread Eric Dumazet
On Wed, Oct 9, 2019 at 8:18 PM Paul E. McKenney wrote: > Again, good catch, applied for review and testing, thank you! > > I added another READ_ONCE() to dump_blkd_tasks(), which is not exercised > unless you get an RCU CPU stall warning or some such. The updated patch > is below, please let me

Re: [PATCH] rcu: avoid data-race in rcu_gp_fqs_check_wake()

2019-10-09 Thread Paul E. McKenney
On Wed, Oct 09, 2019 at 02:21:54PM -0700, Eric Dumazet wrote: > rcu_gp_fqs_check_wake() uses rcu_preempt_blocked_readers_cgp() > to read ->gp_tasks while otehr cpus might write over this field. > > We need READ_ONCE()/WRITE_ONCE() pairs to avoid compiler > tricks and KCSAN splats like the followin

[PATCH] rcu: avoid data-race in rcu_gp_fqs_check_wake()

2019-10-09 Thread Eric Dumazet
rcu_gp_fqs_check_wake() uses rcu_preempt_blocked_readers_cgp() to read ->gp_tasks while otehr cpus might write over this field. We need READ_ONCE()/WRITE_ONCE() pairs to avoid compiler tricks and KCSAN splats like the following : BUG: KCSAN: data-race in rcu_gp_fqs_check_wake / rcu_preempt_defer