[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181207011148.251812-17-bvanassche@acm.org>
Date: Thu, 6 Dec 2018 17:11:40 -0800
From: Bart Van Assche <bvanassche@....org>
To: mingo@...hat.com
Cc: peterz@...radead.org, tj@...nel.org, longman@...hat.com,
johannes.berg@...el.com, linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Johannes Berg <johannes@...solutions.net>
Subject: [PATCH v3 16/24] locking/lockdep: Retain the class key and name while freeing a lock class
The next patch in this series uses the class name in code that
detects calls to lock_acquire() while a class key is being freed. Hence
retain the class name for lock classes that are being freed.
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Waiman Long <longman@...hat.com>
Cc: Johannes Berg <johannes@...solutions.net>
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
kernel/locking/lockdep.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index ecd92969674c..92bdb187987f 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4147,10 +4147,8 @@ static void zap_class(struct lock_class *class)
* Unhash the class and remove it from the all_lock_classes list:
*/
hlist_del_rcu(&class->hash_entry);
+ class->hash_entry.pprev = NULL;
list_del(&class->lock_entry);
-
- RCU_INIT_POINTER(class->key, NULL);
- RCU_INIT_POINTER(class->name, NULL);
}
static inline int within(const void *addr, void *start, unsigned long size)
--
2.20.0.rc2.403.gdbc3b29805-goog
Powered by blists - more mailing lists