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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200916184528.498184-6-kuba@kernel.org>
Date:   Wed, 16 Sep 2020 11:45:26 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     davem@...emloft.net, paulmck@...nel.org, joel@...lfernandes.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        rcu@...r.kernel.org, josh@...htriplett.org, peterz@...radead.org,
        christian.brauner@...ntu.com, Jakub Kicinski <kuba@...nel.org>,
        jiangshanlai@...il.com, rostedt@...dmis.org,
        mathieu.desnoyers@...icios.com
Subject: [PATCH net-next 5/7] srcu: use a more appropriate lockdep helper

lockdep_is_held() is defined as:

 #define lockdep_is_held(lock)		lock_is_held(&(lock)->dep_map)

it hides away the dereference, so that builds with !LOCKDEP
don't break. We should use it instead of using lock_is_held()
directly.

This didn't use to be a problem, because RCU_LOCKDEP_WARN()
cuts the condition out with the preprocessor if !LOCKDEP.
This will soon change.

Signed-off-by: Jakub Kicinski <kuba@...nel.org>
--
CC: jiangshanlai@...il.com
CC: paulmck@...nel.org
CC: josh@...htriplett.org
CC: rostedt@...dmis.org
CC: mathieu.desnoyers@...icios.com
---
 kernel/rcu/srcutree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index c100acf332ed..8123ef15a159 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -919,7 +919,7 @@ static void __synchronize_srcu(struct srcu_struct *ssp, bool do_norm)
 {
 	struct rcu_synchronize rcu;
 
-	RCU_LOCKDEP_WARN(lock_is_held(&ssp->dep_map) ||
+	RCU_LOCKDEP_WARN(lockdep_is_held(ssp) ||
 			 lock_is_held(&rcu_bh_lock_map) ||
 			 lock_is_held(&rcu_lock_map) ||
 			 lock_is_held(&rcu_sched_lock_map),
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ