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 <sven@narfation.org>
This commit is contained in:
Sven Eckelmann
2012-03-29 12:38:20 +02:00
committed by Antonio Quartulli
parent d2b6cc8e46
commit 5d52dad27a
3 changed files with 26 additions and 0 deletions

View File

@@ -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);