* [PATCH, RFC, -rt] Make lockdep-RCU insist on rcu_read_lock_bh()
@ 2011-10-07 0:44 Paul E. McKenney
0 siblings, 0 replies; only message in thread
From: Paul E. McKenney @ 2011-10-07 0:44 UTC (permalink / raw)
To: tglx, peterz; +Cc: linux-rt-users, linux-kernel
rcu: Make -rt complain about lack of rcu_read_lock_bh()
Mainline permits local_bh_disable() to be used in place of
rcu_read_lock_bh(), but this fails for CONFIG_PREEMPT_RT_FULL. This
commit therefore makes rcu_read_lock_bh_held() insist on
rcu_read_lock_bh() for CONFIG_PREEMPT_RT_FULL.
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index 5e0577b..e91a85d 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -89,7 +89,11 @@ int rcu_read_lock_bh_held(void)
{
if (!debug_lockdep_rcu_enabled())
return 1;
+#ifdef CONFIG_PREEMPT_RT_FULL
+ return lock_is_held(&rcu_bh_lock_map);
+#else
return in_softirq() || irqs_disabled();
+#endif
}
EXPORT_SYMBOL_GPL(rcu_read_lock_bh_held);
#endif
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-07 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 0:44 [PATCH, RFC, -rt] Make lockdep-RCU insist on rcu_read_lock_bh() Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).