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

net: Convert icmpv6_sk_ops, ndisc_net_ops and igmp6_net_ops

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: default avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b01a59a4
...@@ -997,6 +997,7 @@ static void __net_exit icmpv6_sk_exit(struct net *net) ...@@ -997,6 +997,7 @@ static void __net_exit icmpv6_sk_exit(struct net *net)
static struct pernet_operations icmpv6_sk_ops = { static struct pernet_operations icmpv6_sk_ops = {
.init = icmpv6_sk_init, .init = icmpv6_sk_init,
.exit = icmpv6_sk_exit, .exit = icmpv6_sk_exit,
.async = true,
}; };
int __init icmpv6_init(void) int __init icmpv6_init(void)
......
...@@ -2997,6 +2997,7 @@ static void __net_exit igmp6_net_exit(struct net *net) ...@@ -2997,6 +2997,7 @@ static void __net_exit igmp6_net_exit(struct net *net)
static struct pernet_operations igmp6_net_ops = { static struct pernet_operations igmp6_net_ops = {
.init = igmp6_net_init, .init = igmp6_net_init,
.exit = igmp6_net_exit, .exit = igmp6_net_exit,
.async = true,
}; };
int __init igmp6_init(void) int __init igmp6_init(void)
......
...@@ -1882,6 +1882,7 @@ static void __net_exit ndisc_net_exit(struct net *net) ...@@ -1882,6 +1882,7 @@ static void __net_exit ndisc_net_exit(struct net *net)
static struct pernet_operations ndisc_net_ops = { static struct pernet_operations ndisc_net_ops = {
.init = ndisc_net_init, .init = ndisc_net_init,
.exit = ndisc_net_exit, .exit = ndisc_net_exit,
.async = true,
}; };
int __init ndisc_init(void) int __init ndisc_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