From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: davem@davemloft.net, pablo@netfilter.org,
kadlec@blackhole.kfki.hu, fw@strlen.de, netdev@vger.kernel.org,
kvalo@codeaurora.org, davem@davemloft.net, edumazet@google.com,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
mostrows@earthlink.net, alex.aring@gmail.com,
stefan@osg.samsung.com, avagin@virtuozzo.com,
ktkhai@virtuozzo.com
Subject: [PATCH net-next 21/28] net: Convert ipvlan_net_ops
Date: Mon, 26 Feb 2018 16:02:48 +0300 [thread overview]
Message-ID: <151965016849.28549.3698280335218691035.stgit@localhost.localdomain> (raw)
In-Reply-To: <151964991129.28549.5478247975928036472.stgit@localhost.localdomain>
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>
---
drivers/net/ipvlan/ipvlan_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 67c91ceda979..d05b902c925b 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -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)
next prev parent reply other threads:[~2018-02-26 13:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 12:59 [PATCH net-next 00/28] Converting pernet_operations (part #3) Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 01/28] net: Convert /proc creating and destroying pernet_operations Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 02/28] net: Convert hashlimit_net_ops and recent_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 03/28] net: Convert synproxy_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 04/28] net: Convert nfs_net_ops Kirill Tkhai
2018-02-26 12:59 ` [PATCH net-next 05/28] net: Convert simple pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 06/28] net: Convert cma_pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 07/28] net: Convert sysctl creating and destroying pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 08/28] net: Convert tc_action_net_init() and tc_action_net_exit() based pernet_operations Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 09/28] net: Convert bond_net_ops Kirill Tkhai
2018-02-26 13:00 ` [PATCH net-next 10/28] net: Convert geneve_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 11/28] net: Convert gtp_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 12/28] net: Convert ppp_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 13/28] net: Convert vxlan_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 14/28] net: Convert br_net_ops Kirill Tkhai
2018-02-26 13:01 ` [PATCH net-next 15/28] net: Convert ipgre_net_ops, ipgre_tap_net_ops, erspan_net_ops, vti_net_ops and ipip_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 16/28] net: Convert ip6gre_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 17/28] net: Convert ip6_tnl_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 18/28] net: Convert vti6_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 19/28] net: Convert sit_net_ops Kirill Tkhai
2018-02-26 13:02 ` [PATCH net-next 20/28] net: Convert cfg802154_pernet_ops Kirill Tkhai
2018-02-27 10:24 ` Stefan Schmidt
2018-02-26 13:02 ` Kirill Tkhai [this message]
2018-02-26 13:02 ` [PATCH net-next 22/28] net: Convert brnf_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 23/28] net: Convert clusterip_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 24/28] net: Convert defrag4_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 25/28] net: Convert ila_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 26/28] net: Convert defrag6_net_ops Kirill Tkhai
2018-02-26 13:03 ` [PATCH net-next 27/28] net: Convert selinux_net_ops Kirill Tkhai
2018-02-26 13:04 ` [PATCH net-next 28/28] net: Convert smack_net_ops Kirill Tkhai
2018-02-27 16:08 ` [PATCH net-next 00/28] Converting pernet_operations (part #3) David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=151965016849.28549.3698280335218691035.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=alex.aring@gmail.com \
--cc=avagin@virtuozzo.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kadlec@blackhole.kfki.hu \
--cc=kvalo@codeaurora.org \
--cc=mostrows@earthlink.net \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=stefan@osg.samsung.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox