Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5eaeaa5 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 900b1028
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);