dev.c (bc7ecbcbc2c0ff235382077b55de7896775afc16) | dev.c (d90a909e1f3e006a1d57fe11fd417173b6494701) |
---|---|
1/* 2 * NET3 Protocol independent device support routines. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 5021 unchanged lines hidden (view full) --- 5030 5031 /* Notify protocols, that a new device appeared. */ 5032 ret = call_netdevice_notifiers(NETDEV_REGISTER, dev); 5033 ret = notifier_to_errno(ret); 5034 if (ret) { 5035 rollback_registered(dev); 5036 dev->reg_state = NETREG_UNREGISTERED; 5037 } | 1/* 2 * NET3 Protocol independent device support routines. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * --- 5021 unchanged lines hidden (view full) --- 5030 5031 /* Notify protocols, that a new device appeared. */ 5032 ret = call_netdevice_notifiers(NETDEV_REGISTER, dev); 5033 ret = notifier_to_errno(ret); 5034 if (ret) { 5035 rollback_registered(dev); 5036 dev->reg_state = NETREG_UNREGISTERED; 5037 } |
5038 /* 5039 * Prevent userspace races by waiting until the network 5040 * device is fully setup before sending notifications. 5041 */ 5042 rtmsg_ifinfo(RTM_NEWLINK, dev, ~0U); |
|
5038 5039out: 5040 return ret; 5041 5042err_uninit: 5043 if (dev->netdev_ops->ndo_uninit) 5044 dev->netdev_ops->ndo_uninit(dev); 5045 goto out; --- 546 unchanged lines hidden (view full) --- 5592 WARN_ON(err); 5593 5594 /* Add the device back in the hashes */ 5595 list_netdevice(dev); 5596 5597 /* Notify protocols, that a new device appeared. */ 5598 call_netdevice_notifiers(NETDEV_REGISTER, dev); 5599 | 5043 5044out: 5045 return ret; 5046 5047err_uninit: 5048 if (dev->netdev_ops->ndo_uninit) 5049 dev->netdev_ops->ndo_uninit(dev); 5050 goto out; --- 546 unchanged lines hidden (view full) --- 5597 WARN_ON(err); 5598 5599 /* Add the device back in the hashes */ 5600 list_netdevice(dev); 5601 5602 /* Notify protocols, that a new device appeared. */ 5603 call_netdevice_notifiers(NETDEV_REGISTER, dev); 5604 |
5605 /* 5606 * Prevent userspace races by waiting until the network 5607 * device is fully setup before sending notifications. 5608 */ 5609 rtmsg_ifinfo(RTM_NEWLINK, dev, ~0U); 5610 |
|
5600 synchronize_net(); 5601 err = 0; 5602out: 5603 return err; 5604} 5605EXPORT_SYMBOL_GPL(dev_change_net_namespace); 5606 5607static int dev_cpu_callback(struct notifier_block *nfb, --- 305 unchanged lines hidden --- | 5611 synchronize_net(); 5612 err = 0; 5613out: 5614 return err; 5615} 5616EXPORT_SYMBOL_GPL(dev_change_net_namespace); 5617 5618static int dev_cpu_callback(struct notifier_block *nfb, --- 305 unchanged lines hidden --- |