lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 6 Oct 2011 17:44:51 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	tglx@...utronix.de, peterz@...radead.org
Cc:	linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH, RFC, -rt] Make lockdep-RCU insist on rcu_read_lock_bh()

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@...aro.org>
Signed-off-by: Paul E. McKenney <paulmck@...ux.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ