* [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences
@ 2014-04-23 19:39 Marek Lindner
2014-04-24 11:59 ` Antonio Quartulli
2014-05-02 4:50 ` Linus Lüssing
0 siblings, 2 replies; 4+ messages in thread
From: Marek Lindner @ 2014-04-23 19:39 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Marek Lindner
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
multicast.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/multicast.c b/multicast.c
index 8c7ca81..96b66fd 100644
--- a/multicast.c
+++ b/multicast.c
@@ -415,7 +415,7 @@ batadv_mcast_forw_ipv4_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_ipv4_list,
mcast_want_all_ipv4_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
@@ -442,7 +442,7 @@ batadv_mcast_forw_ipv6_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_ipv6_list,
mcast_want_all_ipv6_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
@@ -493,7 +493,7 @@ batadv_mcast_forw_unsnoop_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_unsnoopables_list,
mcast_want_all_unsnoopables_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences
2014-04-23 19:39 [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences Marek Lindner
@ 2014-04-24 11:59 ` Antonio Quartulli
2014-05-02 4:50 ` Linus Lüssing
1 sibling, 0 replies; 4+ messages in thread
From: Antonio Quartulli @ 2014-04-24 11:59 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking; +Cc: Marek Lindner
[-- Attachment #1: Type: text/plain, Size: 242 bytes --]
On 23/04/14 21:39, Marek Lindner wrote:
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Acked-by: Antonio Quartulli <antonio@meshcoding.com>
--
Antonio Quartulli
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences
2014-04-23 19:39 [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences Marek Lindner
2014-04-24 11:59 ` Antonio Quartulli
@ 2014-05-02 4:50 ` Linus Lüssing
1 sibling, 0 replies; 4+ messages in thread
From: Linus Lüssing @ 2014-05-02 4:50 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
On Thu, Apr 24, 2014 at 03:39:08AM +0800, Marek Lindner wrote:
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
> ---
> multicast.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/multicast.c b/multicast.c
> index 8c7ca81..96b66fd 100644
> --- a/multicast.c
> +++ b/multicast.c
> @@ -415,7 +415,7 @@ batadv_mcast_forw_ipv4_node_get(struct batadv_priv *bat_priv)
> hlist_for_each_entry_rcu(tmp_orig_node,
> &bat_priv->mcast.want_all_ipv4_list,
> mcast_want_all_ipv4_node) {
> - if (!atomic_inc_not_zero(&orig_node->refcount))
> + if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
> continue;
>
> orig_node = tmp_orig_node;
> @@ -442,7 +442,7 @@ batadv_mcast_forw_ipv6_node_get(struct batadv_priv *bat_priv)
> hlist_for_each_entry_rcu(tmp_orig_node,
> &bat_priv->mcast.want_all_ipv6_list,
> mcast_want_all_ipv6_node) {
> - if (!atomic_inc_not_zero(&orig_node->refcount))
> + if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
> continue;
>
> orig_node = tmp_orig_node;
> @@ -493,7 +493,7 @@ batadv_mcast_forw_unsnoop_node_get(struct batadv_priv *bat_priv)
> hlist_for_each_entry_rcu(tmp_orig_node,
> &bat_priv->mcast.want_all_unsnoopables_list,
> mcast_want_all_unsnoopables_node) {
> - if (!atomic_inc_not_zero(&orig_node->refcount))
> + if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
> continue;
>
> orig_node = tmp_orig_node;
> --
> 2.0.0.rc0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [B.A.T.M.A.N.] pull request net: batman-adv 20140527
@ 2014-05-27 2:25 Antonio Quartulli
2014-05-27 2:25 ` [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences Antonio Quartulli
0 siblings, 1 reply; 4+ messages in thread
From: Antonio Quartulli @ 2014-05-27 2:25 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
Hello David,
here you have another very small fix intended for net/linux-3.15.
It prevents some multicast functions from dereferencing a NULL pointer.
(Actually it was nothing more than a typ0)
I hope it is not too late for such a small patch.
Please pull or let me know of any problem
Thanks a lot,
Antonio
The following changes since commit b6ed5498601df40489606dbc14a9c7011c16630b:
batman: fix a bogus warning from batadv_is_on_batman_iface() (2014-05-22 17:23:00 -0400)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git
for you to fetch changes up to 9d4190df6a21d96238133a9a64866a9c796f4ec8:
batman-adv: fix NULL pointer dereferences (2014-05-23 16:32:32 +0200)
----------------------------------------------------------------
Included changes:
- prevent NULL dereference in multicast code
----------------------------------------------------------------
Marek Lindner (1):
batman-adv: fix NULL pointer dereferences
net/batman-adv/multicast.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences
2014-05-27 2:25 [B.A.T.M.A.N.] pull request net: batman-adv 20140527 Antonio Quartulli
@ 2014-05-27 2:25 ` Antonio Quartulli
0 siblings, 0 replies; 4+ messages in thread
From: Antonio Quartulli @ 2014-05-27 2:25 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n, Marek Lindner, Antonio Quartulli
From: Marek Lindner <mareklindner@neomailbox.ch>
Was introduced with 4c8755d69cbde2ec464a39c932aed0a83f9ff89f
("batman-adv: Send multicast packets to nodes with a WANT_ALL flag")
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Acked-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
net/batman-adv/multicast.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index 8c7ca81..96b66fd 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -415,7 +415,7 @@ batadv_mcast_forw_ipv4_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_ipv4_list,
mcast_want_all_ipv4_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
@@ -442,7 +442,7 @@ batadv_mcast_forw_ipv6_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_ipv6_list,
mcast_want_all_ipv6_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
@@ -493,7 +493,7 @@ batadv_mcast_forw_unsnoop_node_get(struct batadv_priv *bat_priv)
hlist_for_each_entry_rcu(tmp_orig_node,
&bat_priv->mcast.want_all_unsnoopables_list,
mcast_want_all_unsnoopables_node) {
- if (!atomic_inc_not_zero(&orig_node->refcount))
+ if (!atomic_inc_not_zero(&tmp_orig_node->refcount))
continue;
orig_node = tmp_orig_node;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-27 2:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 19:39 [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences Marek Lindner
2014-04-24 11:59 ` Antonio Quartulli
2014-05-02 4:50 ` Linus Lüssing
-- strict thread matches above, loose matches on Subject: below --
2014-05-27 2:25 [B.A.T.M.A.N.] pull request net: batman-adv 20140527 Antonio Quartulli
2014-05-27 2:25 ` [B.A.T.M.A.N.] [PATCH] batman-adv: fix NULL pointer dereferences Antonio Quartulli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.