summaryrefslogtreecommitdiff
path: root/drivers/perf/arm_pmuv3.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2024-11-12 03:28:51 +0300
committerFrederic Weisbecker <frederic@kernel.org>2024-11-16 00:13:37 +0300
commit9407f5c3ec10c155aae61fc4496a7c17a96907b4 (patch)
tree397052adc7965b385e628f13fd87862fa424a4b3 /drivers/perf/arm_pmuv3.c
parentf8ce622ac9d89260595e26d4e0da8cb6b4a8e030 (diff)
downloadlinux-9407f5c3ec10c155aae61fc4496a7c17a96907b4.tar.xz
srcu: Unconditionally record srcu_read_lock_lite() in ->srcu_reader_flavor
Currently, srcu_read_lock_lite() uses the SRCU_READ_FLAVOR_LITE bit in ->srcu_reader_flavor to communicate to the grace-period processing in srcu_readers_active_idx_check() that the smp_mb() must be replaced by a synchronize_rcu(). Unfortunately, ->srcu_reader_flavor is not updated unless the kernel is built with CONFIG_PROVE_RCU=y. Therefore in all kernels built with CONFIG_PROVE_RCU=n, srcu_readers_active_idx_check() incorrectly uses smp_mb() instead of synchronize_rcu() for srcu_struct structures whose readers use srcu_read_lock_lite(). This commit therefore causes Tree SRCU srcu_read_lock_lite() to unconditionally update ->srcu_reader_flavor so that srcu_readers_active_idx_check() can make the correct choice. Reported-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Closes: https://lore.kernel.org/all/d07e8f4a-d5ff-4c8e-8e61-50db285c57e9@amd.com/ Fixes: c0f08d6b5a61 ("srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()") Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Frederic Weisbecker <frederic@kernel.org> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'drivers/perf/arm_pmuv3.c')
0 files changed, 0 insertions, 0 deletions