public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style
@ 2012-10-18  8:48 Sven Eckelmann
  2012-10-18  8:48 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA Sven Eckelmann
  2012-10-18 10:01 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Marek Lindner
  0 siblings, 2 replies; 4+ messages in thread
From: Sven Eckelmann @ 2012-10-18  8:48 UTC (permalink / raw)
  To: b.a.t.m.a.n

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];
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA
  2012-10-18  8:48 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Sven Eckelmann
@ 2012-10-18  8:48 ` Sven Eckelmann
  2012-10-18 10:04   ` Marek Lindner
  2012-10-18 10:01 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Marek Lindner
  1 sibling, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2012-10-18  8:48 UTC (permalink / raw)
  To: b.a.t.m.a.n

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);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style
  2012-10-18  8:48 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Sven Eckelmann
  2012-10-18  8:48 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA Sven Eckelmann
@ 2012-10-18 10:01 ` Marek Lindner
  1 sibling, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-10-18 10:01 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA
  2012-10-18  8:48 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA Sven Eckelmann
@ 2012-10-18 10:04   ` Marek Lindner
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2012-10-18 10:04 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-18 10:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-18  8:48 [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Sven Eckelmann
2012-10-18  8:48 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA Sven Eckelmann
2012-10-18 10:04   ` Marek Lindner
2012-10-18 10:01 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: Fix regression in bla multiline comment style Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox