summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-02-13 12:28:15 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-13 10:36:06 -0500
commit46456675ec1b7f93dadd2b1b4b58d763c3ae9266 (patch)
tree3b2c6dee8aaedea3dcdcf565a08a84099d13e343 /net/core
parent194b95d2166661f890dca5ef3b952c73622eb4e5 (diff)
downloadlinux-46456675ec1b7f93dadd2b1b4b58d763c3ae9266.tar.bz2
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: Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 257e7bbaffba..67f375cfb982 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -4724,6 +4724,7 @@ static void __net_exit rtnetlink_net_exit(struct net *net)
static struct pernet_operations rtnetlink_net_ops = {
.init = rtnetlink_net_init,
.exit = rtnetlink_net_exit,
+ .async = true,
};
void __init rtnetlink_init(void)