diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-03-29 12:38:20 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-18 18:00:57 +0200 |
commit | 5d52dad27a08d2c8851acb12b041088ec07881dd (patch) | |
tree | f5f05095d17bf618eed08fc79ee969b48937dc59 /net/batman-adv/hash.h | |
parent | batman-adv: fix skb->data assignment (diff) | |
download | linux-5d52dad27a08d2c8851acb12b041088ec07881dd.tar.xz linux-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.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index d4bd7862719b..93b3c71aeaf8 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); |