aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 0814a560e5f3..dd3bf582e6f0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5925,6 +5925,8 @@ static void rollback_registered_many(struct list_head *head)
5925 synchronize_net(); 5925 synchronize_net();
5926 5926
5927 list_for_each_entry(dev, head, unreg_list) { 5927 list_for_each_entry(dev, head, unreg_list) {
5928 struct sk_buff *skb = NULL;
5929
5928 /* Shutdown queueing discipline. */ 5930 /* Shutdown queueing discipline. */
5929 dev_shutdown(dev); 5931 dev_shutdown(dev);
5930 5932
@@ -5934,6 +5936,11 @@ static void rollback_registered_many(struct list_head *head)
5934 */ 5936 */
5935 call_netdevice_notifiers(NETDEV_UNREGISTER, dev); 5937 call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
5936 5938
5939 if (!dev->rtnl_link_ops ||
5940 dev->rtnl_link_state == RTNL_LINK_INITIALIZED)
5941 skb = rtmsg_ifinfo_build_skb(RTM_DELLINK, dev, ~0U,
5942 GFP_KERNEL);
5943
5937 /* 5944 /*
5938 * Flush the unicast and multicast chains 5945 * Flush the unicast and multicast chains
5939 */ 5946 */
@@ -5943,9 +5950,8 @@ static void rollback_registered_many(struct list_head *head)
5943 if (dev->netdev_ops->ndo_uninit) 5950 if (dev->netdev_ops->ndo_uninit)
5944 dev->netdev_ops->ndo_uninit(dev); 5951 dev->netdev_ops->ndo_uninit(dev);
5945 5952
5946 if (!dev->rtnl_link_ops || 5953 if (skb)
5947 dev->rtnl_link_state == RTNL_LINK_INITIALIZED) 5954 rtmsg_ifinfo_send(skb, dev, GFP_KERNEL);
5948 rtmsg_ifinfo(RTM_DELLINK, dev, ~0U, GFP_KERNEL);
5949 5955
5950 /* Notifier chain MUST detach us all upper devices. */ 5956 /* Notifier chain MUST detach us all upper devices. */
5951 WARN_ON(netdev_has_any_upper_dev(dev)); 5957 WARN_ON(netdev_has_any_upper_dev(dev));