[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181128234325.110011-14-bvanassche@acm.org>
Date: Wed, 28 Nov 2018 15:43:11 -0800
From: Bart Van Assche <bvanassche@....org>
To: mingo@...hat.com
Cc: peterz@...radead.org, tj@...nel.org, johannes.berg@...el.com,
linux-kernel@...r.kernel.org, Bart Van Assche <bvanassche@....org>
Subject: [PATCH 13/27] locking/lockdep: Complain if a lock object has no name
Lockdep reports about lock objects that do not have a name are hard to
interpret. Hence complain if no name has been assigned to a lock object.
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
kernel/locking/lockdep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 8177a8de1e1d..41fd3b279220 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -743,6 +743,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
struct hlist_head *hash_head;
struct lock_class *class;
+ WARN_ON_ONCE(!lock->name);
DEBUG_LOCKS_WARN_ON(!irqs_disabled());
class = look_up_lock_class(lock, subclass);
--
2.20.0.rc0.387.gc7a69e6b6c-goog
Powered by blists - more mailing lists