4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a comment with the wrong line ending.
Signed-off-by: Sven Eckelmann sven@narfation.org --- Please merge in next
bridge_loop_avoidance.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c index c6c1c59..776a73d 100644 --- a/bridge_loop_avoidance.c +++ b/bridge_loop_avoidance.c @@ -1302,7 +1302,8 @@ int batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv, goto out; } /* not found, add a new entry (overwrite the oldest entry) - * and allow it, its the first occurence. */ + * and allow it, its the first occurence. + */ curr = (bat_priv->bla.bcast_duplist_curr + BATADV_DUPLIST_SIZE - 1); curr %= BATADV_DUPLIST_SIZE; entry = &bat_priv->bla.bcast_duplist[curr];
4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a spinlock for bridge loop avoidance which was initialized outside of bla. This causes an build error when BLA is disabled. Instead the batadv_bla_init function should handle the initialization.
Signed-off-by: Sven Eckelmann sven@narfation.org --- Please merge in next
bridge_loop_avoidance.c | 2 ++ main.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/bridge_loop_avoidance.c b/bridge_loop_avoidance.c index 776a73d..a05b1b4 100644 --- a/bridge_loop_avoidance.c +++ b/bridge_loop_avoidance.c @@ -1204,6 +1204,8 @@ int batadv_bla_init(struct batadv_priv *bat_priv) uint16_t crc; unsigned long entrytime;
+ spin_lock_init(&bat_priv->bla.bcast_duplist_lock); + batadv_dbg(BATADV_DBG_BLA, bat_priv, "bla hash registering\n");
/* setting claim destination address */ diff --git a/main.c b/main.c index 76d653a..2b1123d 100644 --- a/main.c +++ b/main.c @@ -104,7 +104,6 @@ int batadv_mesh_init(struct net_device *soft_iface) spin_lock_init(&bat_priv->gw.list_lock); spin_lock_init(&bat_priv->vis.hash_lock); spin_lock_init(&bat_priv->vis.list_lock); - spin_lock_init(&bat_priv->bla.bcast_duplist_lock);
INIT_HLIST_HEAD(&bat_priv->forw_bat_list); INIT_HLIST_HEAD(&bat_priv->forw_bcast_list);
On Thursday, October 18, 2012 16:48:32 Sven Eckelmann wrote:
4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a spinlock for bridge loop avoidance which was initialized outside of bla. This causes an build error when BLA is disabled. Instead the batadv_bla_init function should handle the initialization.
Signed-off-by: Sven Eckelmann sven@narfation.org
Please merge in next
bridge_loop_avoidance.c | 2 ++ main.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
Applied in revision cca9d02.
Thanks, Marek
On Thursday, October 18, 2012 16:48:31 Sven Eckelmann wrote:
4c1721b39c8a77c99e8f4de97b5d5d112006406c ("batman-adv: Fix potential broadcast BLA-duplicate-check race condition") introduced a comment with the wrong line ending.
Signed-off-by: Sven Eckelmann sven@narfation.org
Please merge in next
bridge_loop_avoidance.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied in revision 5276048.
Thanks, Marek
b.a.t.m.a.n@lists.open-mesh.org