diff options
-rw-r--r-- | net/batman-adv/originator.c | 6 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 10 | ||||
-rw-r--r-- | net/batman-adv/vis.c | 6 |
3 files changed, 22 insertions, 0 deletions
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index 8c32cf1c2dec..109081c49bbd 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -29,6 +29,9 @@ | |||
29 | #include "soft-interface.h" | 29 | #include "soft-interface.h" |
30 | #include "bridge_loop_avoidance.h" | 30 | #include "bridge_loop_avoidance.h" |
31 | 31 | ||
32 | /* hash class keys */ | ||
33 | static struct lock_class_key batadv_orig_hash_lock_class_key; | ||
34 | |||
32 | static void batadv_purge_orig(struct work_struct *work); | 35 | static void batadv_purge_orig(struct work_struct *work); |
33 | 36 | ||
34 | static void batadv_start_purge_timer(struct batadv_priv *bat_priv) | 37 | static void batadv_start_purge_timer(struct batadv_priv *bat_priv) |
@@ -57,6 +60,9 @@ int batadv_originator_init(struct batadv_priv *bat_priv) | |||
57 | if (!bat_priv->orig_hash) | 60 | if (!bat_priv->orig_hash) |
58 | goto err; | 61 | goto err; |
59 | 62 | ||
63 | batadv_hash_set_lock_class(bat_priv->orig_hash, | ||
64 | &batadv_orig_hash_lock_class_key); | ||
65 | |||
60 | batadv_start_purge_timer(bat_priv); | 66 | batadv_start_purge_timer(bat_priv); |
61 | return 0; | 67 | return 0; |
62 | 68 | ||
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 5f442328f2e6..c6fd0b760d3e 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | #include <linux/crc16.h> | 30 | #include <linux/crc16.h> |
31 | 31 | ||
32 | /* hash class keys */ | ||
33 | static struct lock_class_key batadv_tt_local_hash_lock_class_key; | ||
34 | static struct lock_class_key batadv_tt_global_hash_lock_class_key; | ||
35 | |||
32 | static void batadv_send_roam_adv(struct batadv_priv *bat_priv, uint8_t *client, | 36 | static void batadv_send_roam_adv(struct batadv_priv *bat_priv, uint8_t *client, |
33 | struct batadv_orig_node *orig_node); | 37 | struct batadv_orig_node *orig_node); |
34 | static void batadv_tt_purge(struct work_struct *work); | 38 | static void batadv_tt_purge(struct work_struct *work); |
@@ -235,6 +239,9 @@ static int batadv_tt_local_init(struct batadv_priv *bat_priv) | |||
235 | if (!bat_priv->tt.local_hash) | 239 | if (!bat_priv->tt.local_hash) |
236 | return -ENOMEM; | 240 | return -ENOMEM; |
237 | 241 | ||
242 | batadv_hash_set_lock_class(bat_priv->tt.local_hash, | ||
243 | &batadv_tt_local_hash_lock_class_key); | ||
244 | |||
238 | return 0; | 245 | return 0; |
239 | } | 246 | } |
240 | 247 | ||
@@ -694,6 +701,9 @@ static int batadv_tt_global_init(struct batadv_priv *bat_priv) | |||
694 | if (!bat_priv->tt.global_hash) | 701 | if (!bat_priv->tt.global_hash) |
695 | return -ENOMEM; | 702 | return -ENOMEM; |
696 | 703 | ||
704 | batadv_hash_set_lock_class(bat_priv->tt.global_hash, | ||
705 | &batadv_tt_global_hash_lock_class_key); | ||
706 | |||
697 | return 0; | 707 | return 0; |
698 | } | 708 | } |
699 | 709 | ||
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 0f65a9de5f74..60eb9b7ca8d1 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -28,6 +28,9 @@ | |||
28 | 28 | ||
29 | #define BATADV_MAX_VIS_PACKET_SIZE 1000 | 29 | #define BATADV_MAX_VIS_PACKET_SIZE 1000 |
30 | 30 | ||
31 | /* hash class keys */ | ||
32 | static struct lock_class_key batadv_vis_hash_lock_class_key; | ||
33 | |||
31 | static void batadv_start_vis_timer(struct batadv_priv *bat_priv); | 34 | static void batadv_start_vis_timer(struct batadv_priv *bat_priv); |
32 | 35 | ||
33 | /* free the info */ | 36 | /* free the info */ |
@@ -852,6 +855,9 @@ int batadv_vis_init(struct batadv_priv *bat_priv) | |||
852 | goto err; | 855 | goto err; |
853 | } | 856 | } |
854 | 857 | ||
858 | batadv_hash_set_lock_class(bat_priv->vis.hash, | ||
859 | &batadv_vis_hash_lock_class_key); | ||
860 | |||
855 | bat_priv->vis.my_info = kmalloc(BATADV_MAX_VIS_PACKET_SIZE, GFP_ATOMIC); | 861 | bat_priv->vis.my_info = kmalloc(BATADV_MAX_VIS_PACKET_SIZE, GFP_ATOMIC); |
856 | if (!bat_priv->vis.my_info) | 862 | if (!bat_priv->vis.my_info) |
857 | goto err; | 863 | goto err; |