From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA
Date: Thu, 18 Oct 2012 10:48:32 +0200 [thread overview]
Message-ID: <1350550112-5857-2-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1350550112-5857-1-git-send-email-sven@narfation.org>
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
next prev parent reply other threads:[~2012-10-18 8:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-10-18 10:04 ` [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Fix build of batman-adv without BLA 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350550112-5857-2-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox