* [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation
@ 2015-07-17 8:03 Sven Eckelmann
2015-07-17 8:03 ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts Sven Eckelmann
2015-07-19 8:45 ` [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Marek Lindner
0 siblings, 2 replies; 5+ messages in thread
From: Sven Eckelmann @ 2015-07-17 8:03 UTC (permalink / raw)
To: b.a.t.m.a.n
commit 29b9256e6631 ("batman-adv: consider outgoing interface in OGM
sending") incorrectly indented the interface check code.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2: Change commit message to new git commit description style
net/batman-adv/bat_iv_ogm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index df54118..5c12200 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -968,7 +968,7 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
rcu_read_lock();
list_for_each_entry_rcu(tmp_hard_iface, &batadv_hardif_list, list) {
if (tmp_hard_iface->soft_iface != hard_iface->soft_iface)
- continue;
+ continue;
batadv_iv_ogm_queue_add(bat_priv, *ogm_buff,
*ogm_buff_len, hard_iface,
tmp_hard_iface, 1, send_time);
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts
2015-07-17 8:03 [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Sven Eckelmann
@ 2015-07-17 8:03 ` Sven Eckelmann
2015-07-19 13:28 ` Linus Lüssing
2015-07-19 8:45 ` [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Marek Lindner
1 sibling, 1 reply; 5+ messages in thread
From: Sven Eckelmann @ 2015-07-17 8:03 UTC (permalink / raw)
To: b.a.t.m.a.n
The BUG_ON added to the multicast code in commit 7f220ed1f063 ("batman-adv:
Fix potential synchronization issues in mcast tvlv handler") will crash the
kernel when the statement is true. This is not strictly required and a
WARN_ON is enough to raise attention.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2: Change commit message to new git commit description style
net/batman-adv/multicast.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 25ed931..d71c70e 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -618,7 +618,7 @@ static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(!hlist_unhashed(node));
+ WARN_ON(!hlist_unhashed(node));
hlist_add_head_rcu(node, head);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
@@ -629,7 +629,7 @@ static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(hlist_unhashed(node));
+ WARN_ON(hlist_unhashed(node));
hlist_del_init_rcu(node);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
@@ -663,7 +663,7 @@ static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(!hlist_unhashed(node));
+ WARN_ON(!hlist_unhashed(node));
hlist_add_head_rcu(node, head);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
@@ -674,7 +674,7 @@ static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(hlist_unhashed(node));
+ WARN_ON(hlist_unhashed(node));
hlist_del_init_rcu(node);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
@@ -708,7 +708,7 @@ static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(!hlist_unhashed(node));
+ WARN_ON(!hlist_unhashed(node));
hlist_add_head_rcu(node, head);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
@@ -719,7 +719,7 @@ static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
spin_lock_bh(&bat_priv->mcast.want_lists_lock);
/* flag checks above + mcast_handler_lock prevents this */
- BUG_ON(hlist_unhashed(node));
+ WARN_ON(hlist_unhashed(node));
hlist_del_init_rcu(node);
spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation
2015-07-17 8:03 [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Sven Eckelmann
2015-07-17 8:03 ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts Sven Eckelmann
@ 2015-07-19 8:45 ` Marek Lindner
1 sibling, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2015-07-19 8:45 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
On Friday, July 17, 2015 10:03:42 Sven Eckelmann wrote:
> commit 29b9256e6631 ("batman-adv: consider outgoing interface in OGM
> sending") incorrectly indented the interface check code.
>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> v2: Change commit message to new git commit description style
>
> net/batman-adv/bat_iv_ogm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied in revision a25feff.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts
2015-07-17 8:03 ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts Sven Eckelmann
@ 2015-07-19 13:28 ` Linus Lüssing
2015-07-20 5:50 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Linus Lüssing @ 2015-07-19 13:28 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Sounds good, that'll probably spare us some discussions about
BUG_ON()s on netdev :).
Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
On Fri, Jul 17, 2015 at 10:03:43AM +0200, Sven Eckelmann wrote:
> The BUG_ON added to the multicast code in commit 7f220ed1f063 ("batman-adv:
> Fix potential synchronization issues in mcast tvlv handler") will crash the
> kernel when the statement is true. This is not strictly required and a
> WARN_ON is enough to raise attention.
>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> v2: Change commit message to new git commit description style
>
> net/batman-adv/multicast.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
> index 25ed931..d71c70e 100644
> --- a/net/batman-adv/multicast.c
> +++ b/net/batman-adv/multicast.c
> @@ -618,7 +618,7 @@ static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(!hlist_unhashed(node));
> + WARN_ON(!hlist_unhashed(node));
>
> hlist_add_head_rcu(node, head);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> @@ -629,7 +629,7 @@ static void batadv_mcast_want_unsnoop_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(hlist_unhashed(node));
> + WARN_ON(hlist_unhashed(node));
>
> hlist_del_init_rcu(node);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> @@ -663,7 +663,7 @@ static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(!hlist_unhashed(node));
> + WARN_ON(!hlist_unhashed(node));
>
> hlist_add_head_rcu(node, head);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> @@ -674,7 +674,7 @@ static void batadv_mcast_want_ipv4_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(hlist_unhashed(node));
> + WARN_ON(hlist_unhashed(node));
>
> hlist_del_init_rcu(node);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> @@ -708,7 +708,7 @@ static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(!hlist_unhashed(node));
> + WARN_ON(!hlist_unhashed(node));
>
> hlist_add_head_rcu(node, head);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> @@ -719,7 +719,7 @@ static void batadv_mcast_want_ipv6_update(struct batadv_priv *bat_priv,
>
> spin_lock_bh(&bat_priv->mcast.want_lists_lock);
> /* flag checks above + mcast_handler_lock prevents this */
> - BUG_ON(hlist_unhashed(node));
> + WARN_ON(hlist_unhashed(node));
>
> hlist_del_init_rcu(node);
> spin_unlock_bh(&bat_priv->mcast.want_lists_lock);
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts
2015-07-19 13:28 ` Linus Lüssing
@ 2015-07-20 5:50 ` Marek Lindner
0 siblings, 0 replies; 5+ messages in thread
From: Marek Lindner @ 2015-07-20 5:50 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
On Sunday, July 19, 2015 15:28:23 Linus Lüssing wrote:
> Sounds good, that'll probably spare us some discussions about
> BUG_ON()s on netdev :).
>
> Acked-by: Linus Lüssing <linus.luessing@c0d3.blue>
Applied in revision 7ad001a.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-20 5:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17 8:03 [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Sven Eckelmann
2015-07-17 8:03 ` [B.A.T.M.A.N.] [PATCH v2 2/2] batman-adv: Avoid crashing kernel with multicast asserts Sven Eckelmann
2015-07-19 13:28 ` Linus Lüssing
2015-07-20 5:50 ` Marek Lindner
2015-07-19 8:45 ` [B.A.T.M.A.N.] [PATCH v2 1/2] batman-adv: Fix conditional statements indentation Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox