[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160788607388.3364.5591152415390075235.tip-bot2@tip-bot2>
Date: Sun, 13 Dec 2020 19:01:13 -0000
From: "tip-bot2 for Jakub Kicinski" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>,
"Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] srcu: Use a more appropriate lockdep helper
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: f505d4346f6129d4708338491cf23ca9cf1d8f2a
Gitweb: https://git.kernel.org/tip/f505d4346f6129d4708338491cf23ca9cf1d8f2a
Author: Jakub Kicinski <kuba@...nel.org>
AuthorDate: Wed, 16 Sep 2020 11:45:26 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Mon, 02 Nov 2020 17:10:00 -08:00
srcu: Use a more appropriate lockdep helper
The lockdep_is_held() macro is defined as:
#define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map)
This hides away the dereference, so that builds with !LOCKDEP don't break.
This works in current kernels because the RCU_LOCKDEP_WARN() eliminates
its condition at preprocessor time in !LOCKDEP kernels. However, later
patches in this series will cause the compiler to see this condition even
in !LOCKDEP kernels. This commit prepares for this upcoming change by
switching from lock_is_held() to lockdep_is_held().
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
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
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 c13348e..6cd6fa2 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -906,7 +906,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),
Powered by blists - more mailing lists