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: Call unregister_netdev on failures to get rtnl lock
@ 2010-05-19 11:43 Sven Eckelmann
  2010-05-19 19:10 ` [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; 3+ messages in thread
From: Sven Eckelmann @ 2010-05-19 11:43 UTC (permalink / raw)
  To: b.a.t.m.a.n

We must call unregister_netdev when we couldn't initialise the
batman-adv module and the soft_device was registered. There are two
version of the function which we can use:
 * unregister_netdevice - removes device
 * unregister_netdev - takes rtnl semaphore and remove device

We don't hold the semaphore in a error case. So we must use
unregister_netdev.

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

diff --git a/batman-adv-kernelland/main.c b/batman-adv-kernelland/main.c
index cbabba6..51856a7 100644
--- a/batman-adv-kernelland/main.c
+++ b/batman-adv-kernelland/main.c
@@ -129,7 +129,7 @@ int init_module(void)
 unreg_sysfs:
 	sysfs_del_meshif(soft_device);
 unreg_soft_device:
-	unregister_netdevice(soft_device);
+	unregister_netdev(soft_device);
 free_soft_device:
 	free_netdev(soft_device);
 	soft_device = NULL;
-- 
1.7.1


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

* [B.A.T.M.A.N.] [PATCH-maint] batman-adv: Call unregister_netdev on failures to get rtnl lock
  2010-05-19 11:43 [B.A.T.M.A.N.] [PATCH] batman-adv: Call unregister_netdev on failures to get rtnl lock Sven Eckelmann
@ 2010-05-19 19:10 ` Sven Eckelmann
  2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " Marek Lindner
  1 sibling, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2010-05-19 19:10 UTC (permalink / raw)
  To: b.a.t.m.a.n

We must call unregister_netdev when we couldn't initialise the
batman-adv module and the soft_device was registered. There are two
version of the function which we can use:
 * unregister_netdevice - removes device
 * unregister_netdev - takes rtnl semaphore and remove device

We don't hold the semaphore in a error case. So we must use
unregister_netdev.

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

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

diff --git a/main.c b/main.c
index 770625f..6e6d925 100644
--- a/main.c
+++ b/main.c
@@ -137,7 +137,7 @@ int init_module(void)
 unreg_sysfs:
 	sysfs_del_meshif(soft_device);
 unreg_soft_device:
-	unregister_netdevice(soft_device);
+	unregister_netdev(soft_device);
 free_soft_device:
 	free_netdev(soft_device);
 	soft_device = NULL;
-- 
1.7.1


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

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: Call unregister_netdev on failures to get rtnl lock
  2010-05-19 11:43 [B.A.T.M.A.N.] [PATCH] batman-adv: Call unregister_netdev on failures to get rtnl lock Sven Eckelmann
  2010-05-19 19:10 ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
@ 2010-05-21 10:56 ` Marek Lindner
  1 sibling, 0 replies; 3+ 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 19:43:48 Sven Eckelmann wrote:
> We must call unregister_netdev when we couldn't initialise the
> batman-adv module and the soft_device was registered. There are two
> version of the function which we can use:
>  * unregister_netdevice - removes device
>  * unregister_netdev - takes rtnl semaphore and remove device
> 
> We don't hold the semaphore in a error case. So we must use
> unregister_netdev

Applied in revision 1665.

Thanks,
Marek

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-19 11:43 [B.A.T.M.A.N.] [PATCH] batman-adv: Call unregister_netdev on failures to get rtnl lock Sven Eckelmann
2010-05-19 19:10 ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
2010-05-21 10:56 ` [B.A.T.M.A.N.] [PATCH] " 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).