summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-02-10 14:50:46 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-04-18 11:38:18 -0700
commitb5eaeaa509d30812049f9e1c05446d564e91616b (patch)
treeb12c83bf2e5ee0e2b4b792d6fb04411c2887cc10 /kernel
parent900b1028ec388e50c98200641ae4274794c807cf (diff)
downloadtalos-obmc-linux-b5eaeaa509d30812049f9e1c05446d564e91616b.tar.gz
talos-obmc-linux-b5eaeaa509d30812049f9e1c05446d564e91616b.zip
srcu: Allow early boot use of synchronize_srcu()
This commit checks for pre-scheduler state, and if that early in the boot process, synchronize_srcu() and friends are no-ops. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcu/srcu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c
index e6da9fc1f0e9..7e7ecaa50dc5 100644
--- a/kernel/rcu/srcu.c
+++ b/kernel/rcu/srcu.c
@@ -417,6 +417,8 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount)
lock_is_held(&rcu_sched_lock_map),
"Illegal synchronize_srcu() in same-type SRCU (or in RCU) read-side critical section");
+ if (rcu_scheduler_active == RCU_SCHEDULER_INACTIVE)
+ return;
might_sleep();
init_completion(&rcu.completion);
OpenPOWER on IntegriCloud