Commit 174caf7a authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Greg Kroah-Hartman
Browse files

rcu/nocb: Make IRQs disablement symmetric



[ Upstream commit b913c3fe ]

Currently IRQs are disabled on call_rcu() and then depending on the
context:

* If the CPU is in nocb mode:

   - If the callback is enqueued in the bypass list, IRQs are re-enabled
     implictly by rcu_nocb_try_bypass()

   - If the callback is enqueued in the normal list, IRQs are re-enabled
     implicitly by __call_rcu_nocb_wake()

* If the CPU is NOT in nocb mode, IRQs are reenabled explicitly from call_rcu()

This makes the code a bit hard to follow, especially as it interleaves
with nocb locking.

To make the IRQ flags coverage clearer and also in order to prepare for
moving all the nocb enqueue code to its own function, always re-enable
the IRQ flags explicitly from call_rcu().

Reviewed-by: default avatarNeeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Stable-dep-of: f7345ccc ("rcu/nocb: Fix rcuog wake-up from offline softirq")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8bb79eb1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment