From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr30117.outbound.protection.outlook.com ([40.107.3.117]:11087 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752964AbeBZM7e (ORCPT ); Mon, 26 Feb 2018 07:59:34 -0500 Subject: [PATCH net-next 02/28] net: Convert hashlimit_net_ops and recent_net_ops From: Kirill Tkhai 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 Date: Mon, 26 Feb 2018 15:59:28 +0300 Message-ID: <151964996820.28549.15608006393821821583.stgit@localhost.localdomain> In-Reply-To: <151964991129.28549.5478247975928036472.stgit@localhost.localdomain> References: <151964991129.28549.5478247975928036472.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: These pernet_operations just create and destroy /proc entries. Also, new /proc entries also may come after new nf rules are added, but this is not possible, when net isn't alive. So, they are safe to be marked as async. Signed-off-by: Kirill Tkhai --- net/netfilter/xt_hashlimit.c | 1 + net/netfilter/xt_recent.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index ca6847403ca2..53889a7bf91d 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -1343,6 +1343,7 @@ static struct pernet_operations hashlimit_net_ops = { .exit = hashlimit_net_exit, .id = &hashlimit_net_id, .size = sizeof(struct hashlimit_net), + .async = true, }; static int __init hashlimit_mt_init(void) diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 245fa350a7a8..d25cede62cb1 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -689,6 +689,7 @@ static struct pernet_operations recent_net_ops = { .exit = recent_net_exit, .id = &recent_net_id, .size = sizeof(struct recent_net), + .async = true, }; static struct xt_match recent_mt_reg[] __read_mostly = {