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>
This commit is contained in:
Simon Wunderlich 2011-11-07 13:57:48 +01:00 коммит произвёл Sven Eckelmann
Родитель 80b3f58cf4
Коммит 06ba7ce223
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -874,7 +874,7 @@ unreg_debugfs:
unreg_sysfs:
sysfs_del_meshif(soft_iface);
unreg_soft_iface:
unregister_netdev(soft_iface);
unregister_netdevice(soft_iface);
return NULL;
free_soft_iface: