From: Paul E. McKenney Date: Fri, 10 Feb 2017 22:50:46 +0000 (-0800) Subject: srcu: Allow early boot use of synchronize_srcu() X-Git-Tag: MMI-PSA29.97-13-9~5623^2~5^2^3~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5eaeaa509d30812049f9e1c05446d564e91616b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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);