|
@@ -1127,6 +1127,14 @@ out:
|
|
|
bla_start_timer(bat_priv);
|
|
|
}
|
|
|
|
|
|
+/* The hash for claim and backbone hash receive the same key because they
|
|
|
+ * are getting initialized by hash_new with the same key. Reinitializing
|
|
|
+ * them with to different keys to allow nested locking without generating
|
|
|
+ * lockdep warnings
|
|
|
+ */
|
|
|
+static struct lock_class_key claim_hash_lock_class_key;
|
|
|
+static struct lock_class_key backbone_hash_lock_class_key;
|
|
|
+
|
|
|
/* initialize all bla structures */
|
|
|
int bla_init(struct bat_priv *bat_priv)
|
|
|
{
|
|
@@ -1164,6 +1172,11 @@ int bla_init(struct bat_priv *bat_priv)
|
|
|
if (!bat_priv->claim_hash || !bat_priv->backbone_hash)
|
|
|
return -1;
|
|
|
|
|
|
+ batadv_hash_set_lock_class(bat_priv->claim_hash,
|
|
|
+ &claim_hash_lock_class_key);
|
|
|
+ batadv_hash_set_lock_class(bat_priv->backbone_hash,
|
|
|
+ &backbone_hash_lock_class_key);
|
|
|
+
|
|
|
bat_dbg(DBG_BLA, bat_priv, "bla hashes initialized\n");
|
|
|
|
|
|
bla_start_timer(bat_priv);
|