rtnetlink.c (038d49baab571800e3077b9d322a004f95c8aa8f) rtnetlink.c (554873e517115c4b7207259f1cadfd77d90b5395)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 398 unchanged lines hidden (view full) ---

407 }
408 unregister_netdevice_many(&list_kill);
409}
410
411/**
412 * __rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink.
413 * @ops: struct rtnl_link_ops * to unregister
414 *
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 398 unchanged lines hidden (view full) ---

407 }
408 unregister_netdevice_many(&list_kill);
409}
410
411/**
412 * __rtnl_link_unregister - Unregister rtnl_link_ops from rtnetlink.
413 * @ops: struct rtnl_link_ops * to unregister
414 *
415 * The caller must hold the rtnl_mutex.
415 * The caller must hold the rtnl_mutex and guarantee net_namespace_list
416 * integrity (hold pernet_ops_rwsem for writing to close the race
417 * with setup_net() and cleanup_net()).
416 */
417void __rtnl_link_unregister(struct rtnl_link_ops *ops)
418{
419 struct net *net;
420
418 */
419void __rtnl_link_unregister(struct rtnl_link_ops *ops)
420{
421 struct net *net;
422
421 down_read(&net_rwsem);
422 for_each_net(net) {
423 __rtnl_kill_links(net, ops);
424 }
423 for_each_net(net) {
424 __rtnl_kill_links(net, ops);
425 }
425 up_read(&net_rwsem);
426 list_del(&ops->list);
427}
428EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
429
430/* Return with the rtnl_lock held when there are no network
431 * devices unregistering in any network namespace.
432 */
433static void rtnl_lock_unregistering_all(void)

--- 4334 unchanged lines hidden ---
426 list_del(&ops->list);
427}
428EXPORT_SYMBOL_GPL(__rtnl_link_unregister);
429
430/* Return with the rtnl_lock held when there are no network
431 * devices unregistering in any network namespace.
432 */
433static void rtnl_lock_unregistering_all(void)

--- 4334 unchanged lines hidden ---