|
@@ -2710,13 +2710,13 @@ static __net_init int vxlan_init_net(struct net *net)
|
|
static __net_exit void vxlan_exit_net(struct net *net)
|
|
static __net_exit void vxlan_exit_net(struct net *net)
|
|
{
|
|
{
|
|
struct vxlan_net *vn = net_generic(net, vxlan_net_id);
|
|
struct vxlan_net *vn = net_generic(net, vxlan_net_id);
|
|
- struct vxlan_dev *vxlan;
|
|
|
|
- LIST_HEAD(list);
|
|
|
|
|
|
+ struct vxlan_dev *vxlan, *next;
|
|
|
|
+ LIST_HEAD(list_kill);
|
|
|
|
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- list_for_each_entry(vxlan, &vn->vxlan_list, next)
|
|
|
|
- unregister_netdevice_queue(vxlan->dev, &list);
|
|
|
|
- unregister_netdevice_many(&list);
|
|
|
|
|
|
+ list_for_each_entry_safe(vxlan, next, &vn->vxlan_list, next)
|
|
|
|
+ vxlan_dellink(vxlan->dev, &list_kill);
|
|
|
|
+ unregister_netdevice_many(&list_kill);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
}
|
|
}
|
|
|
|
|