From 851a67b825540a8e00c0be3ee25e4627ba8b133b Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Thu, 11 Oct 2007 22:11:12 +0200 Subject: lockdep: annotate rcu_read_{,un}lock{,_bh} lockdep annotate rcu_read_{,un}lock{,_bh} in order to catch imbalanced usage. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: Paul E. McKenney --- kernel/rcupdate.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kernel/rcupdate.c') diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 2c2dd8410dc4..130214f3d229 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -49,6 +49,14 @@ #include #include +#ifdef CONFIG_DEBUG_LOCK_ALLOC +static struct lock_class_key rcu_lock_key; +struct lockdep_map rcu_lock_map = + STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key); + +EXPORT_SYMBOL_GPL(rcu_lock_map); +#endif + /* Definition for rcupdate control block. */ static struct rcu_ctrlblk rcu_ctrlblk = { .cur = -300, -- cgit v1.2.3