]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: Convert icmpv6_sk_ops, ndisc_net_ops and igmp6_net_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 19 Feb 2018 08:48:57 +0000 (11:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Feb 2018 19:19:10 +0000 (14:19 -0500)
These pernet_operations create and destroy net::ipv6.icmp_sk
socket, used to send ICMP or error reply.

Nobody can dereference the socket to handle a packet before
net is initialized, as there is no routing; nobody can do
that in parallel with exit, as all of devices are moved
to init_net or destroyed and there are no packets it-flight.
So, it's possible to mark these pernet_operations as async.

The same for ndisc_net_ops and for igmp6_net_ops. The last
one also creates and destroys /proc entries.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/icmp.c
net/ipv6/mcast.c
net/ipv6/ndisc.c

index 6ae5dd3f4d0de422ec36d4c25453f5841fd2a51e..4fa4f1b150a4d149385a8422de9faa1906d9b19c 100644 (file)
@@ -997,6 +997,7 @@ static void __net_exit icmpv6_sk_exit(struct net *net)
 static struct pernet_operations icmpv6_sk_ops = {
        .init = icmpv6_sk_init,
        .exit = icmpv6_sk_exit,
+       .async = true,
 };
 
 int __init icmpv6_init(void)
index 9b9d2ff01b3554cbf5f176e642484d1efde6a547..d9bb933dd5c422fd8cba974e3c4e6fe961999d7d 100644 (file)
@@ -2997,6 +2997,7 @@ static void __net_exit igmp6_net_exit(struct net *net)
 static struct pernet_operations igmp6_net_ops = {
        .init = igmp6_net_init,
        .exit = igmp6_net_exit,
+       .async = true,
 };
 
 int __init igmp6_init(void)
index f61a5b613b52b065d8754af8adb9948f17eafc48..0a19ce3a6f7ff1664b41c225f9117382dbf06815 100644 (file)
@@ -1882,6 +1882,7 @@ static void __net_exit ndisc_net_exit(struct net *net)
 static struct pernet_operations ndisc_net_ops = {
        .init = ndisc_net_init,
        .exit = ndisc_net_exit,
+       .async = true,
 };
 
 int __init ndisc_init(void)