diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 2 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 04d3e301402..4513dfd5718 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5629,7 +5629,7 @@ restart: | |||
5629 | 5629 | ||
5630 | /* Delete virtual devices */ | 5630 | /* Delete virtual devices */ |
5631 | if (dev->rtnl_link_ops && dev->rtnl_link_ops->dellink) { | 5631 | if (dev->rtnl_link_ops && dev->rtnl_link_ops->dellink) { |
5632 | dev->rtnl_link_ops->dellink(dev); | 5632 | dev->rtnl_link_ops->dellink(dev, NULL); |
5633 | goto restart; | 5633 | goto restart; |
5634 | } | 5634 | } |
5635 | 5635 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 52ea418d530..391a62cd9df 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -248,7 +248,7 @@ static LIST_HEAD(link_ops); | |||
248 | int __rtnl_link_register(struct rtnl_link_ops *ops) | 248 | int __rtnl_link_register(struct rtnl_link_ops *ops) |
249 | { | 249 | { |
250 | if (!ops->dellink) | 250 | if (!ops->dellink) |
251 | ops->dellink = unregister_netdevice; | 251 | ops->dellink = unregister_netdevice_queue; |
252 | 252 | ||
253 | list_add_tail(&ops->list, &link_ops); | 253 | list_add_tail(&ops->list, &link_ops); |
254 | return 0; | 254 | return 0; |
@@ -277,13 +277,13 @@ EXPORT_SYMBOL_GPL(rtnl_link_register); | |||
277 | static void __rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops) | 277 | static void __rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops) |
278 | { | 278 | { |
279 | struct net_device *dev; | 279 | struct net_device *dev; |
280 | restart: | 280 | LIST_HEAD(list_kill); |
281 | |||
281 | for_each_netdev(net, dev) { | 282 | for_each_netdev(net, dev) { |
282 | if (dev->rtnl_link_ops == ops) { | 283 | if (dev->rtnl_link_ops == ops) |
283 | ops->dellink(dev); | 284 | ops->dellink(dev, &list_kill); |
284 | goto restart; | ||
285 | } | ||
286 | } | 285 | } |
286 | unregister_netdevice_many(&list_kill); | ||
287 | } | 287 | } |
288 | 288 | ||
289 | void rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops) | 289 | void rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops) |
@@ -972,7 +972,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
972 | if (!ops) | 972 | if (!ops) |
973 | return -EOPNOTSUPP; | 973 | return -EOPNOTSUPP; |
974 | 974 | ||
975 | ops->dellink(dev); | 975 | ops->dellink(dev, NULL); |
976 | return 0; | 976 | return 0; |
977 | } | 977 | } |
978 | 978 | ||