All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
* [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

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.