Commit 46456675 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by David S. Miller

net: Convert rtnetlink_net_ops

rtnetlink_net_init() and rtnetlink_net_exit()
create and destroy netlink socket net::rtnl.

The socket is used to send rtnl notification via
rtnl_net_notifyid(). There is no a problem
to create and destroy it in parallel with other
pernet operations, as we link net in setup_net()
after the socket is created, and destroy
in cleanup_net() after net is unhashed from all
the lists and there is no RCU references on it.
Signed-off-by: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: default avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 194b95d2
...@@ -4724,6 +4724,7 @@ static void __net_exit rtnetlink_net_exit(struct net *net) ...@@ -4724,6 +4724,7 @@ static void __net_exit rtnetlink_net_exit(struct net *net)
static struct pernet_operations rtnetlink_net_ops = { static struct pernet_operations rtnetlink_net_ops = {
.init = rtnetlink_net_init, .init = rtnetlink_net_init,
.exit = rtnetlink_net_exit, .exit = rtnetlink_net_exit,
.async = true,
}; };
void __init rtnetlink_init(void) void __init rtnetlink_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment