Commit 51cace13 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Disable interrupts directly in rcu_gp_init()

Interrupts are enabled in rcu_gp_init(), so this commit switches from
local_irq_save() and local_irq_restore() to local_irq_disable() and
local_irq_enable().

Link: https://lore.kernel.org/all/febb13ab-a4bb-48b4-8e97-7e9f7749e6da@moroto.mountain/Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 6f948568
...@@ -1832,7 +1832,7 @@ static noinline_for_stack bool rcu_gp_init(void) ...@@ -1832,7 +1832,7 @@ static noinline_for_stack bool rcu_gp_init(void)
WRITE_ONCE(rcu_state.gp_state, RCU_GP_ONOFF); WRITE_ONCE(rcu_state.gp_state, RCU_GP_ONOFF);
/* Exclude CPU hotplug operations. */ /* Exclude CPU hotplug operations. */
rcu_for_each_leaf_node(rnp) { rcu_for_each_leaf_node(rnp) {
local_irq_save(flags); local_irq_disable();
arch_spin_lock(&rcu_state.ofl_lock); arch_spin_lock(&rcu_state.ofl_lock);
raw_spin_lock_rcu_node(rnp); raw_spin_lock_rcu_node(rnp);
if (rnp->qsmaskinit == rnp->qsmaskinitnext && if (rnp->qsmaskinit == rnp->qsmaskinitnext &&
...@@ -1840,7 +1840,7 @@ static noinline_for_stack bool rcu_gp_init(void) ...@@ -1840,7 +1840,7 @@ static noinline_for_stack bool rcu_gp_init(void)
/* Nothing to do on this leaf rcu_node structure. */ /* Nothing to do on this leaf rcu_node structure. */
raw_spin_unlock_rcu_node(rnp); raw_spin_unlock_rcu_node(rnp);
arch_spin_unlock(&rcu_state.ofl_lock); arch_spin_unlock(&rcu_state.ofl_lock);
local_irq_restore(flags); local_irq_enable();
continue; continue;
} }
...@@ -1877,7 +1877,7 @@ static noinline_for_stack bool rcu_gp_init(void) ...@@ -1877,7 +1877,7 @@ static noinline_for_stack bool rcu_gp_init(void)
raw_spin_unlock_rcu_node(rnp); raw_spin_unlock_rcu_node(rnp);
arch_spin_unlock(&rcu_state.ofl_lock); arch_spin_unlock(&rcu_state.ofl_lock);
local_irq_restore(flags); local_irq_enable();
} }
rcu_gp_slow(gp_preinit_delay); /* Races with CPU hotplug. */ rcu_gp_slow(gp_preinit_delay); /* Races with CPU hotplug. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment