summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-07-12 18:03:35 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-08-17 16:26:25 +0200
commitd4db30af51eb94ccfd0037e114c1c12cc299a3f8 (patch)
treeb23375fb5eff959b7a4a9b3267144a5fa776a9bb
parentrcu: Make rcu_idle_enter() rely on callers disabling irqs (diff)
downloadlinux-d4db30af51eb94ccfd0037e114c1c12cc299a3f8.tar.xz
linux-d4db30af51eb94ccfd0037e114c1c12cc299a3f8.zip
rcu: Add warning to rcu_idle_enter() for irqs enabled
All current callers of rcu_idle_enter() have irqs disabled, and rcu_idle_enter() relies on this, but doesn't check. This commit therefore adds a RCU_LOCKDEP_WARN() to add some verification to the trust. While we are there, pass "true" rather than "1" to rcu_eqs_enter(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--kernel/rcu/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 76f88b65961f..5f4eccac1701 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -859,7 +859,8 @@ EXPORT_SYMBOL_GPL(rcu_idle_enter);
*/
void rcu_user_enter(void)
{
- rcu_eqs_enter(1);
+ RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_user_enter() invoked with irqs enabled!!!");
+ rcu_eqs_enter(true);
}
#endif /* CONFIG_NO_HZ_FULL */