diff options
author | David S. Miller <davem@davemloft.net> | 2019-05-09 12:44:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-09 12:44:17 -0400 |
commit | d7e163ced48f942c9a307117e15b0f863a01bc1e (patch) | |
tree | af9b356a71bf6b9b25c8c7f0fd3d4829d363f2a4 /net | |
parent | 2cf672709beb005f6e90cb4edbed6f2218ba953e (diff) | |
parent | a3c7cd0cdf1107f891aff847ad481e34df727055 (diff) |
Merge tag 'batadv-net-for-davem-20190509' of git://git.open-mesh.org/linux-merge
Simon Wunderlich says:
====================
This feature/cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich (we forgot to include
this patch previously ...)
- fix multicast tt/tvlv worker locking, by Linus Lüssing
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/main.c | 1 | ||||
-rw-r--r-- | net/batman-adv/main.h | 2 | ||||
-rw-r--r-- | net/batman-adv/multicast.c | 11 | ||||
-rw-r--r-- | net/batman-adv/types.h | 5 |
4 files changed, 10 insertions, 9 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index dabcaff87e34..4a89177def64 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -168,6 +168,7 @@ int batadv_mesh_init(struct net_device *soft_iface) | |||
168 | spin_lock_init(&bat_priv->tt.commit_lock); | 168 | spin_lock_init(&bat_priv->tt.commit_lock); |
169 | spin_lock_init(&bat_priv->gw.list_lock); | 169 | spin_lock_init(&bat_priv->gw.list_lock); |
170 | #ifdef CONFIG_BATMAN_ADV_MCAST | 170 | #ifdef CONFIG_BATMAN_ADV_MCAST |
171 | spin_lock_init(&bat_priv->mcast.mla_lock); | ||
171 | spin_lock_init(&bat_priv->mcast.want_lists_lock); | 172 | spin_lock_init(&bat_priv->mcast.want_lists_lock); |
172 | #endif | 173 | #endif |
173 | spin_lock_init(&bat_priv->tvlv.container_list_lock); | 174 | spin_lock_init(&bat_priv->tvlv.container_list_lock); |
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index f827e441025f..c59afcba31e0 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define BATADV_DRIVER_DEVICE "batman-adv" | 13 | #define BATADV_DRIVER_DEVICE "batman-adv" |
14 | 14 | ||
15 | #ifndef BATADV_SOURCE_VERSION | 15 | #ifndef BATADV_SOURCE_VERSION |
16 | #define BATADV_SOURCE_VERSION "2019.1" | 16 | #define BATADV_SOURCE_VERSION "2019.2" |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | /* B.A.T.M.A.N. parameters */ | 19 | /* B.A.T.M.A.N. parameters */ |
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index 3feb9435b715..ec54e236e345 100644 --- a/net/batman-adv/multicast.c +++ b/net/batman-adv/multicast.c | |||
@@ -314,8 +314,6 @@ static void batadv_mcast_mla_list_free(struct hlist_head *mcast_list) | |||
314 | * translation table except the ones listed in the given mcast_list. | 314 | * translation table except the ones listed in the given mcast_list. |
315 | * | 315 | * |
316 | * If mcast_list is NULL then all are retracted. | 316 | * If mcast_list is NULL then all are retracted. |
317 | * | ||
318 | * Do not call outside of the mcast worker! (or cancel mcast worker first) | ||
319 | */ | 317 | */ |
320 | static void batadv_mcast_mla_tt_retract(struct batadv_priv *bat_priv, | 318 | static void batadv_mcast_mla_tt_retract(struct batadv_priv *bat_priv, |
321 | struct hlist_head *mcast_list) | 319 | struct hlist_head *mcast_list) |
@@ -323,8 +321,6 @@ static void batadv_mcast_mla_tt_retract(struct batadv_priv *bat_priv, | |||
323 | struct batadv_hw_addr *mcast_entry; | 321 | struct batadv_hw_addr *mcast_entry; |
324 | struct hlist_node *tmp; | 322 | struct hlist_node *tmp; |
325 | 323 | ||
326 | WARN_ON(delayed_work_pending(&bat_priv->mcast.work)); | ||
327 | |||
328 | hlist_for_each_entry_safe(mcast_entry, tmp, &bat_priv->mcast.mla_list, | 324 | hlist_for_each_entry_safe(mcast_entry, tmp, &bat_priv->mcast.mla_list, |
329 | list) { | 325 | list) { |
330 | if (mcast_list && | 326 | if (mcast_list && |
@@ -348,8 +344,6 @@ static void batadv_mcast_mla_tt_retract(struct batadv_priv *bat_priv, | |||
348 | * | 344 | * |
349 | * Adds multicast listener announcements from the given mcast_list to the | 345 | * Adds multicast listener announcements from the given mcast_list to the |
350 | * translation table if they have not been added yet. | 346 | * translation table if they have not been added yet. |
351 | * | ||
352 | * Do not call outside of the mcast worker! (or cancel mcast worker first) | ||
353 | */ | 347 | */ |
354 | static void batadv_mcast_mla_tt_add(struct batadv_priv *bat_priv, | 348 | static void batadv_mcast_mla_tt_add(struct batadv_priv *bat_priv, |
355 | struct hlist_head *mcast_list) | 349 | struct hlist_head *mcast_list) |
@@ -357,8 +351,6 @@ static void batadv_mcast_mla_tt_add(struct batadv_priv *bat_priv, | |||
357 | struct batadv_hw_addr *mcast_entry; | 351 | struct batadv_hw_addr *mcast_entry; |
358 | struct hlist_node *tmp; | 352 | struct hlist_node *tmp; |
359 | 353 | ||
360 | WARN_ON(delayed_work_pending(&bat_priv->mcast.work)); | ||
361 | |||
362 | if (!mcast_list) | 354 | if (!mcast_list) |
363 | return; | 355 | return; |
364 | 356 | ||
@@ -647,7 +639,10 @@ static void batadv_mcast_mla_update(struct work_struct *work) | |||
647 | priv_mcast = container_of(delayed_work, struct batadv_priv_mcast, work); | 639 | priv_mcast = container_of(delayed_work, struct batadv_priv_mcast, work); |
648 | bat_priv = container_of(priv_mcast, struct batadv_priv, mcast); | 640 | bat_priv = container_of(priv_mcast, struct batadv_priv, mcast); |
649 | 641 | ||
642 | spin_lock(&bat_priv->mcast.mla_lock); | ||
650 | __batadv_mcast_mla_update(bat_priv); | 643 | __batadv_mcast_mla_update(bat_priv); |
644 | spin_unlock(&bat_priv->mcast.mla_lock); | ||
645 | |||
651 | batadv_mcast_start_timer(bat_priv); | 646 | batadv_mcast_start_timer(bat_priv); |
652 | } | 647 | } |
653 | 648 | ||
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 357ca119329a..74b644738a36 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h | |||
@@ -1212,6 +1212,11 @@ struct batadv_priv_mcast { | |||
1212 | unsigned char bridged:1; | 1212 | unsigned char bridged:1; |
1213 | 1213 | ||
1214 | /** | 1214 | /** |
1215 | * @mla_lock: a lock protecting mla_list and mla_flags | ||
1216 | */ | ||
1217 | spinlock_t mla_lock; | ||
1218 | |||
1219 | /** | ||
1215 | * @num_want_all_unsnoopables: number of nodes wanting unsnoopable IP | 1220 | * @num_want_all_unsnoopables: number of nodes wanting unsnoopable IP |
1216 | * traffic | 1221 | * traffic |
1217 | */ | 1222 | */ |