提交 06ba7ce2 编写于 作者: S Simon Wunderlich 提交者: Sven Eckelmann

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: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: NSven Eckelmann <sven@narfation.org>
上级 80b3f58c
......@@ -874,7 +874,7 @@ struct net_device *softif_create(const char *name)
unreg_sysfs:
sysfs_del_meshif(soft_iface);
unreg_soft_iface:
unregister_netdev(soft_iface);
unregister_netdevice(soft_iface);
return NULL;
free_soft_iface:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册