* (no subject)
[not found] <pull request for net: batman-adv 2013-05-21>
@ 2013-05-21 19:53 ` Antonio Quartulli
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:53 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Hello David,
this is another small patch for net/linux-3.10. It is preventing a double free
of the bat_counters in case of mesh initialisation failure.
Sorry for sending such small pull requests (I guess this is not that bad since
they target net :-)), but these are small glitches we are finding while testing
new features.
Please pull or let me know if there is any problem.
Thanks a lot,
Antonio
The following changes since commit 3ccfc1b1d2fa78f8ece83646027982916fcc794b:
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless (2013-05-20 14:05:22 -0700)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-fix-for-davem
for you to fetch changes up to f69ae770e74df420fbcf93aae81b30a5dcc73b7d:
batman-adv: Avoid double freeing of bat_counters (2013-05-21 21:34:36 +0200)
----------------------------------------------------------------
Included change:
- fix double free in case of failure during mesh initialisation
----------------------------------------------------------------
Martin Hundebøll (1):
batman-adv: Avoid double freeing of bat_counters
net/batman-adv/main.c | 1 +
net/batman-adv/soft-interface.c | 1 +
2 files changed, 2 insertions(+)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [B.A.T.M.A.N.] (no subject)
@ 2013-05-21 19:53 ` Antonio Quartulli
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:53 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
Hello David,
this is another small patch for net/linux-3.10. It is preventing a double free
of the bat_counters in case of mesh initialisation failure.
Sorry for sending such small pull requests (I guess this is not that bad since
they target net :-)), but these are small glitches we are finding while testing
new features.
Please pull or let me know if there is any problem.
Thanks a lot,
Antonio
The following changes since commit 3ccfc1b1d2fa78f8ece83646027982916fcc794b:
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless (2013-05-20 14:05:22 -0700)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batman-adv-fix-for-davem
for you to fetch changes up to f69ae770e74df420fbcf93aae81b30a5dcc73b7d:
batman-adv: Avoid double freeing of bat_counters (2013-05-21 21:34:36 +0200)
----------------------------------------------------------------
Included change:
- fix double free in case of failure during mesh initialisation
----------------------------------------------------------------
Martin Hundebøll (1):
batman-adv: Avoid double freeing of bat_counters
net/batman-adv/main.c | 1 +
net/batman-adv/soft-interface.c | 1 +
2 files changed, 2 insertions(+)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] batman-adv: Avoid double freeing of bat_counters
2013-05-21 19:53 ` [B.A.T.M.A.N.] " Antonio Quartulli
@ 2013-05-21 19:53 ` Antonio Quartulli
-1 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:53 UTC (permalink / raw)
To: davem
Cc: netdev, b.a.t.m.a.n, Martin Hundebøll, Marek Lindner,
Antonio Quartulli
From: Martin Hundebøll <martin@hundeboll.net>
On errors in batadv_mesh_init(), bat_counters will be freed in both
batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this
by returning earlier from batadv_softif_init_late() in case of errors in
batadv_mesh_init() and by setting bat_counters to NULL after freeing.
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
net/batman-adv/main.c | 1 +
net/batman-adv/soft-interface.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 1240f07..51aafd6 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -181,6 +181,7 @@ void batadv_mesh_free(struct net_device *soft_iface)
batadv_originator_free(bat_priv);
free_percpu(bat_priv->bat_counters);
+ bat_priv->bat_counters = NULL;
atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE);
}
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 6f20d33..819dfb0 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -505,6 +505,7 @@ unreg_debugfs:
batadv_debugfs_del_meshif(dev);
free_bat_counters:
free_percpu(bat_priv->bat_counters);
+ bat_priv->bat_counters = NULL;
return ret;
}
--
1.8.1.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [B.A.T.M.A.N.] [PATCH] batman-adv: Avoid double freeing of bat_counters
@ 2013-05-21 19:53 ` Antonio Quartulli
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:53 UTC (permalink / raw)
To: davem
Cc: netdev, Martin Hundebøll, b.a.t.m.a.n, Marek Lindner,
Antonio Quartulli
From: Martin Hundebøll <martin@hundeboll.net>
On errors in batadv_mesh_init(), bat_counters will be freed in both
batadv_mesh_free() and batadv_softif_init_late(). This patch fixes this
by returning earlier from batadv_softif_init_late() in case of errors in
batadv_mesh_init() and by setting bat_counters to NULL after freeing.
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
net/batman-adv/main.c | 1 +
net/batman-adv/soft-interface.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 1240f07..51aafd6 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -181,6 +181,7 @@ void batadv_mesh_free(struct net_device *soft_iface)
batadv_originator_free(bat_priv);
free_percpu(bat_priv->bat_counters);
+ bat_priv->bat_counters = NULL;
atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE);
}
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index 6f20d33..819dfb0 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -505,6 +505,7 @@ unreg_debugfs:
batadv_debugfs_del_meshif(dev);
free_bat_counters:
free_percpu(bat_priv->bat_counters);
+ bat_priv->bat_counters = NULL;
return ret;
}
--
1.8.1.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: (no subject)
2013-05-21 19:53 ` [B.A.T.M.A.N.] " Antonio Quartulli
@ 2013-05-21 19:56 ` Antonio Quartulli
-1 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Tue, May 21, 2013 at 09:53:54PM +0200, Antonio Quartulli wrote:
> Hello David,
Sorry but git-send-email fooled me. Subject was supposed to be:
pull request for net: batman-adv 2013-05-21
Regards,
>
> this is another small patch for net/linux-3.10. It is preventing a double free
> of the bat_counters in case of mesh initialisation failure.
>
> Sorry for sending such small pull requests (I guess this is not that bad since
> they target net :-)), but these are small glitches we are finding while testing
> new features.
>
> Please pull or let me know if there is any problem.
>
> Thanks a lot,
> Antonio
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [B.A.T.M.A.N.] (no subject)
@ 2013-05-21 19:56 ` Antonio Quartulli
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Quartulli @ 2013-05-21 19:56 UTC (permalink / raw)
To: davem; +Cc: netdev, b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 729 bytes --]
On Tue, May 21, 2013 at 09:53:54PM +0200, Antonio Quartulli wrote:
> Hello David,
Sorry but git-send-email fooled me. Subject was supposed to be:
pull request for net: batman-adv 2013-05-21
Regards,
>
> this is another small patch for net/linux-3.10. It is preventing a double free
> of the bat_counters in case of mesh initialisation failure.
>
> Sorry for sending such small pull requests (I guess this is not that bad since
> they target net :-)), but these are small glitches we are finding while testing
> new features.
>
> Please pull or let me know if there is any problem.
>
> Thanks a lot,
> Antonio
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [B.A.T.M.A.N.] (no subject)
2013-05-21 19:56 ` [B.A.T.M.A.N.] " Antonio Quartulli
(?)
@ 2013-05-23 7:08 ` David Miller
-1 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2013-05-23 7:08 UTC (permalink / raw)
To: ordex; +Cc: netdev, b.a.t.m.a.n
From: Antonio Quartulli <ordex@autistici.org>
Date: Tue, 21 May 2013 21:56:26 +0200
> On Tue, May 21, 2013 at 09:53:54PM +0200, Antonio Quartulli wrote:
>> Hello David,
>
> Sorry but git-send-email fooled me. Subject was supposed to be:
>
> pull request for net: batman-adv 2013-05-21
Pulled, thanks Antonio.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-05-23 7:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <pull request for net: batman-adv 2013-05-21>
2013-05-21 19:53 ` (no subject) Antonio Quartulli
2013-05-21 19:53 ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-05-21 19:53 ` [PATCH] batman-adv: Avoid double freeing of bat_counters Antonio Quartulli
2013-05-21 19:53 ` [B.A.T.M.A.N.] " Antonio Quartulli
[not found] ` <1369166035-585-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2013-05-21 19:56 ` (no subject) Antonio Quartulli
2013-05-21 19:56 ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-05-23 7:08 ` David Miller
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.