b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice
@ 2010-05-19 14:02 Sven Eckelmann
  2010-05-19 19:11 ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
  2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " Marek Lindner
  0 siblings, 2 replies; 4+ messages in thread
From: Sven Eckelmann @ 2010-05-19 14:02 UTC (permalink / raw)
  To: b.a.t.m.a.n

Free_netdev is registered as destructor in interface_setup for every
soft_device. This destructor is automatically called from
unregister_netdev and we must not call it again for the freed
net_device.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batman-adv-kernelland/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/batman-adv-kernelland/main.c b/batman-adv-kernelland/main.c
index 51856a7..c9132c0 100644
--- a/batman-adv-kernelland/main.c
+++ b/batman-adv-kernelland/main.c
@@ -130,6 +130,9 @@ unreg_sysfs:
 	sysfs_del_meshif(soft_device);
 unreg_soft_device:
 	unregister_netdev(soft_device);
+	soft_device = NULL;
+	return -ENOMEM;
+
 free_soft_device:
 	free_netdev(soft_device);
 	soft_device = NULL;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [B.A.T.M.A.N.] [PATCH-maint] batman-adv: Don't call free_netdev twice
  2010-05-19 14:02 [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice Sven Eckelmann
@ 2010-05-19 19:11 ` Sven Eckelmann
  2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " Marek Lindner
  1 sibling, 0 replies; 4+ messages in thread
From: Sven Eckelmann @ 2010-05-19 19:11 UTC (permalink / raw)
  To: b.a.t.m.a.n

Free_netdev is registered as destructor in interface_setup for every
soft_device. This destructor is automatically called from
unregister_netdev and we must not call it again for the free'd
net_device.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
This patch is created for maint and should be applied using `git am`.
Following patches should be applied before:
 * batman-adv: Move device for icmp injection to debugfs
 * batman-adv: Move tables from sysfs to debugfs
 * batman-adv: Call unregister_netdev on failures to get rtnl lock

 main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/main.c b/main.c
index 6e6d925..6c6df6b 100644
--- a/main.c
+++ b/main.c
@@ -138,6 +138,9 @@ unreg_sysfs:
 	sysfs_del_meshif(soft_device);
 unreg_soft_device:
 	unregister_netdev(soft_device);
+	soft_device = NULL;
+	return -ENOMEM;
+
 free_soft_device:
 	free_netdev(soft_device);
 	soft_device = NULL;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice
  2010-05-19 14:02 [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice Sven Eckelmann
  2010-05-19 19:11 ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
@ 2010-05-21 10:56 ` Marek Lindner
  2010-05-21 10:57   ` Marek Lindner
  1 sibling, 1 reply; 4+ messages in thread
From: Marek Lindner @ 2010-05-21 10:56 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Wednesday 19 May 2010 22:02:02 Sven Eckelmann wrote:
> Free_netdev is registered as destructor in interface_setup for every
> soft_device. This destructor is automatically called from
> unregister_netdev and we must not call it again for the freed
> net_device.

Applied in rev 1665.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice
  2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " Marek Lindner
@ 2010-05-21 10:57   ` Marek Lindner
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Lindner @ 2010-05-21 10:57 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Friday 21 May 2010 18:56:08 Marek Lindner wrote:
> On Wednesday 19 May 2010 22:02:02 Sven Eckelmann wrote:
> > Free_netdev is registered as destructor in interface_setup for every
> > soft_device. This destructor is automatically called from
> > unregister_netdev and we must not call it again for the freed
> > net_device.
> 
> Applied in rev 1665.

Sorry, revision 1666.

Cheers,
Marek

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-21 10:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-19 14:02 [B.A.T.M.A.N.] [PATCH] batman-adv: Don't call free_netdev twice Sven Eckelmann
2010-05-19 19:11 ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " Marek Lindner
2010-05-21 10:57   ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).