aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 3ad5425b82d..d7c0bc62da7 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -785,6 +785,7 @@ static int macvlan_device_event(struct notifier_block *unused,
785 struct net_device *dev = ptr; 785 struct net_device *dev = ptr;
786 struct macvlan_dev *vlan, *next; 786 struct macvlan_dev *vlan, *next;
787 struct macvlan_port *port; 787 struct macvlan_port *port;
788 LIST_HEAD(list_kill);
788 789
789 if (!macvlan_port_exists(dev)) 790 if (!macvlan_port_exists(dev))
790 return NOTIFY_DONE; 791 return NOTIFY_DONE;
@@ -810,7 +811,9 @@ static int macvlan_device_event(struct notifier_block *unused,
810 break; 811 break;
811 812
812 list_for_each_entry_safe(vlan, next, &port->vlans, list) 813 list_for_each_entry_safe(vlan, next, &port->vlans, list)
813 vlan->dev->rtnl_link_ops->dellink(vlan->dev, NULL); 814 vlan->dev->rtnl_link_ops->dellink(vlan->dev, &list_kill);
815 unregister_netdevice_many(&list_kill);
816 list_del(&list_kill);
814 break; 817 break;
815 case NETDEV_PRE_TYPE_CHANGE: 818 case NETDEV_PRE_TYPE_CHANGE:
816 /* Forbid underlaying device to change its type. */ 819 /* Forbid underlaying device to change its type. */