提交 68eabe8b 编写于 作者: K Kirill Tkhai 提交者: David S. Miller

net: Convert ipvlan_net_ops

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: NKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f17c9bf0
...@@ -1024,6 +1024,7 @@ static struct pernet_operations ipvlan_net_ops = { ...@@ -1024,6 +1024,7 @@ static struct pernet_operations ipvlan_net_ops = {
.id = &ipvlan_netid, .id = &ipvlan_netid,
.size = sizeof(struct ipvlan_netns), .size = sizeof(struct ipvlan_netns),
.exit = ipvlan_ns_exit, .exit = ipvlan_ns_exit,
.async = true,
}; };
static int __init ipvlan_init_module(void) static int __init ipvlan_init_module(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册