]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: Convert ipvlan_net_ops
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 26 Feb 2018 13:02:48 +0000 (16:02 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 16:01:38 +0000 (11:01 -0500)
These pernet_operations unregister ipvlan net hooks.
nf_unregister_net_hooks() removes hooks one-by-one,
and then frees the memory via rcu. This looks similar
to that happens, when a new hooks is added: allocation
of bigger memory region, copy of old content, and rcu
freeing the old memory. So, all of net code should be
well with this behavior. Also at the time of hook
unregistering, there are no packets, and foreign net
pernet_operations are not interested in others hooks.
So, we mark them as async.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_main.c

index 67c91ceda9792c79015e526bed5fef9be1831d77..d05b902c925b5c67aac6e0cbcb22a2f63782da05 100644 (file)
@@ -1024,6 +1024,7 @@ static struct pernet_operations ipvlan_net_ops = {
        .id = &ipvlan_netid,
        .size = sizeof(struct ipvlan_netns),
        .exit = ipvlan_ns_exit,
+       .async = true,
 };
 
 static int __init ipvlan_init_module(void)