diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2011-11-07 07:57:48 -0500 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-11-20 07:08:37 -0500 |
commit | 06ba7ce223045369cb5459f95e6c27e708938cf4 (patch) | |
tree | 399a4f37dbbdcfd8bf9a00d915f86c2c290d7797 /net/batman-adv/soft-interface.c | |
parent | 80b3f58cf416770ae89b30734d252d641a56d289 (diff) |
batman-adv: use unregister_netdevice() when softif_create fails
When entering softif_create(), the rtnl lock has already been acquired
by store_mesh_iface().
(store_mesh_iface() -> hardif_enable_interface() -> softif_create)
In case of an error, we should therefore call unregister_netdevice()
instead of unregister_netdev().
unregister_netdev() tries to acquire the rtnl lock itself and deadlocks
in this situation. unregister_netdevice() assumes that the rtnl lock
is already been held.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 45297c843092..987c75a775f9 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -874,7 +874,7 @@ unreg_debugfs: | |||
874 | unreg_sysfs: | 874 | unreg_sysfs: |
875 | sysfs_del_meshif(soft_iface); | 875 | sysfs_del_meshif(soft_iface); |
876 | unreg_soft_iface: | 876 | unreg_soft_iface: |
877 | unregister_netdev(soft_iface); | 877 | unregister_netdevice(soft_iface); |
878 | return NULL; | 878 | return NULL; |
879 | 879 | ||
880 | free_soft_iface: | 880 | free_soft_iface: |