From 5d52dad27a08d2c8851acb12b041088ec07881dd Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Thu, 29 Mar 2012 12:38:20 +0200 Subject: batman-adv: Initialize lockdep class keys for hashes The hash for claim and backbone hash in the bridge loop avoidance code receive the same key because they are getting initialized by hash_new with the same key. Lockdep will create a backtrace when they are used recursively. This can be avoided by reinitializing the key directly after the hash_new. Signed-off-by: Sven Eckelmann --- net/batman-adv/hash.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/batman-adv/hash.h') diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index d4bd786..93b3c71 100644 --- a/net/batman-adv/hash.h +++ b/net/batman-adv/hash.h @@ -45,6 +45,10 @@ struct hashtable_t { /* allocates and clears the hash */ struct hashtable_t *hash_new(uint32_t size); +/* set class key for all locks */ +void batadv_hash_set_lock_class(struct hashtable_t *hash, + struct lock_class_key *key); + /* free only the hashtable and the hash itself. */ void hash_destroy(struct hashtable_t *hash); -- cgit v1.1