[linux-next] LinuxNextTracking branch, master, updated. next-20120810
by batman@open-mesh.org
The following commit has been merged in the master branch:
commit 155e4e12b9f49c2dc817bb4c44e9416c46833c3d
Author: Jesper Juhl <jj(a)chaosbits.net>
Date: Tue Aug 7 08:32:34 2012 +0000
batman-adv: Fix mem leak in the batadv_tt_local_event() function
Memory is allocated for 'tt_change_node' with kmalloc().
'tt_change_node' may go out of scope really being used for anything
(except have a few members initialized) if we hit the 'del:' label.
This patch makes sure we free the memory in that case.
Signed-off-by: Jesper Juhl <jj(a)chaosbits.net>
Acked-by: Antonio Quartulli <ordex(a)autistici.org>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index a438f4b..99dd8f7 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -197,6 +197,7 @@ static void batadv_tt_local_event(struct batadv_priv *bat_priv,
del:
list_del(&entry->list);
kfree(entry);
+ kfree(tt_change_node);
event_removed = true;
goto unlock;
}
--
LinuxNextTracking
10 years, 6 months
[linux-next] LinuxNextTracking branch, master, updated. next-20120807
by batman@open-mesh.org
The following commit has been merged in the master branch:
commit caa0bf648cd20a2efbb6558531711e9ce2c6e948
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Sat Aug 4 04:13:26 2012 +0000
batman-adv: select an internet gateway if none was chosen
This is a regression introduced by: 2265c141086474bbae55a5bb3afa1ebb78ccaa7c
("batman-adv: gateway election code refactoring")
Reported-by: Nicolás Echániz <nicoechaniz(a)codigosur.org>
Signed-off-by: Marek Lindner <lindner_marek(a)yahoo.de>
Acked-by: Antonio Quartulli <ordex(a)autistici.org>
Signed-off-by: Antonio Quartulli <ordex(a)autistici.org>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index b421cc4..fc866f2 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -200,11 +200,11 @@ void batadv_gw_election(struct batadv_priv *bat_priv)
if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_CLIENT)
goto out;
- if (!batadv_atomic_dec_not_zero(&bat_priv->gw_reselect))
- goto out;
-
curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
+ if (!batadv_atomic_dec_not_zero(&bat_priv->gw_reselect) && curr_gw)
+ goto out;
+
next_gw = batadv_gw_get_best_gw_node(bat_priv);
if (curr_gw == next_gw)
--
LinuxNextTracking
10 years, 6 months
Build check errors found: 2012-08-02
by postmaster@open-mesh.org
Name of failed tests
====================
checkpatch master main.h
checkpatch next main.h
Output of different failed tests
================================
checkpatch master main.h:
>>>>>>>>
WARNING: Single statement macros should not use a do {} while (0) loop
#183: FILE: main.h:183:
+#define batadv_dbg(type, bat_priv, fmt, arg...) \
+ do { \
+ if (atomic_read(&bat_priv->log_level) & type) \
+ batadv_debug_log(bat_priv, fmt, ## arg);\
+ } \
+ while (0)
total: 0 errors, 1 warnings, 0 checks, 283 lines checked
checkpatch next main.h:
>>>>>>>>
WARNING: Single statement macros should not use a do {} while (0) loop
#182: FILE: main.h:182:
+#define batadv_dbg(type, bat_priv, fmt, arg...) \
+ do { \
+ if (atomic_read(&bat_priv->log_level) & type) \
+ batadv_debug_log(bat_priv, fmt, ## arg);\
+ } \
+ while (0)
total: 0 errors, 1 warnings, 0 checks, 282 lines checked
10 years, 6 months