aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hash.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-03-29 06:38:20 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 12:00:57 -0400
commit5d52dad27a08d2c8851acb12b041088ec07881dd (patch)
treef5f05095d17bf618eed08fc79ee969b48937dc59 /net/batman-adv/hash.h
parentd2b6cc8e460494251442a877fcbc150faa175b4f (diff)
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>
Diffstat (limited to 'net/batman-adv/hash.h')
-rw-r--r--net/batman-adv/hash.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h
index d4bd7862719..93b3c71aeaf 100644
--- a/net/batman-adv/hash.h
+++ b/net/batman-adv/hash.h
@@ -45,6 +45,10 @@ struct hashtable_t {
45/* allocates and clears the hash */ 45/* allocates and clears the hash */
46struct hashtable_t *hash_new(uint32_t size); 46struct hashtable_t *hash_new(uint32_t size);
47 47
48/* set class key for all locks */
49void batadv_hash_set_lock_class(struct hashtable_t *hash,
50 struct lock_class_key *key);
51
48/* free only the hashtable and the hash itself. */ 52/* free only the hashtable and the hash itself. */
49void hash_destroy(struct hashtable_t *hash); 53void hash_destroy(struct hashtable_t *hash);
50 54