summaryrefslogtreecommitdiff
path: root/net/batman-adv/hash.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2012-03-29 12:38:20 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 18:00:57 +0200
commit5d52dad27a08d2c8851acb12b041088ec07881dd (patch)
treef5f05095d17bf618eed08fc79ee969b48937dc59 /net/batman-adv/hash.h
parentd2b6cc8e460494251442a877fcbc150faa175b4f (diff)
downloadlinux-3.10-5d52dad27a08d2c8851acb12b041088ec07881dd.tar.gz
linux-3.10-5d52dad27a08d2c8851acb12b041088ec07881dd.tar.bz2
linux-3.10-5d52dad27a08d2c8851acb12b041088ec07881dd.zip
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 {
/* 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);