batman-adv: call unregister_netdev() to have it handle the locking for us

Message ID 1391873298-3639-1-git-send-email-mareklindner@neomailbox.ch (mailing list archive)
State Accepted, archived
Commit 548c938bfef2dfad63d999fc9005f1d387e3d15a
Headers

Commit Message

Marek Lindner Feb. 8, 2014, 3:28 p.m. UTC
  Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 soft-interface.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
  

Comments

Marek Lindner Feb. 11, 2014, 12:02 p.m. UTC | #1
On Saturday 08 February 2014 23:28:18 Marek Lindner wrote:
> Reported-by: Sven Eckelmann <sven@narfation.org>
> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
> ---
>  soft-interface.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Applied in revision 548c938.

Thanks,
Marek
  

Patch

diff --git a/soft-interface.c b/soft-interface.c
index db3e467..633e9d6 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -652,10 +652,7 @@  static void batadv_softif_destroy_finish(struct work_struct *work)
 	}
 
 	batadv_sysfs_del_meshif(soft_iface);
-
-	rtnl_lock();
-	unregister_netdevice(soft_iface);
-	rtnl_unlock();
+	unregister_netdev(soft_iface);
 }
 
 /**