aboutsummaryrefslogtreecommitdiff
path: root/kernel/rcu/tree_stall.h
diff options
context:
space:
mode:
authorGravatar Paul E. McKenney <paulmck@kernel.org> 2020-06-23 18:04:45 -0700
committerGravatar Paul E. McKenney <paulmck@kernel.org> 2020-08-24 18:36:07 -0700
commitfe63b723cc7ca3a91ea91274e0f2cba29452b3fa (patch)
treeaab109d4dd32f14442ef1a483466e2a6fa99027f /kernel/rcu/tree_stall.h
parentrcu: Add READ_ONCE() to rcu_do_batch() access to rcu_resched_ns (diff)
downloadlinux-fe63b723cc7ca3a91ea91274e0f2cba29452b3fa.tar.gz
linux-fe63b723cc7ca3a91ea91274e0f2cba29452b3fa.tar.bz2
linux-fe63b723cc7ca3a91ea91274e0f2cba29452b3fa.zip
rcu: Add READ_ONCE() to rcu_do_batch() access to rcu_kick_kthreads
Given that sysfs can change the value of rcu_kick_kthreads at any time, this commit adds a READ_ONCE() to the sole access to that variable. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_stall.h')
-rw-r--r--kernel/rcu/tree_stall.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
index b5d3b4794db4..a1780a621b5e 100644
--- a/kernel/rcu/tree_stall.h
+++ b/kernel/rcu/tree_stall.h
@@ -158,7 +158,7 @@ static void rcu_stall_kick_kthreads(void)
{
unsigned long j;
- if (!rcu_kick_kthreads)
+ if (!READ_ONCE(rcu_kick_kthreads))
return;
j = READ_ONCE(rcu_state.jiffies_kick_kthreads);
if (time_after(jiffies, j) && rcu_state.gp_kthread &&
@@ -580,7 +580,7 @@ static void check_cpu_stall(struct rcu_data *rdp)
unsigned long js;
struct rcu_node *rnp;
- if ((rcu_stall_is_suppressed() && !rcu_kick_kthreads) ||
+ if ((rcu_stall_is_suppressed() && !READ_ONCE(rcu_kick_kthreads)) ||
!rcu_gp_in_progress())
return;
rcu_stall_kick_kthreads();