From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbdKTSgP (ORCPT ); Mon, 20 Nov 2017 13:36:15 -0500 Received: from mail-ve1eur01on0125.outbound.protection.outlook.com ([104.47.1.125]:14512 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752941AbdKTSgJ (ORCPT ); Mon, 20 Nov 2017 13:36:09 -0500 Subject: [PATCH v2 24/31] net: Convert pernet_subsys, registered from inet_init() From: Kirill Tkhai To: davem@davemloft.net, vyasevic@redhat.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, vyasevich@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, adobriyan@gmail.com, fw@strlen.de, nicolas.dichtel@6wind.com, xiyou.wangcong@gmail.com, roman.kapl@sysgo.com, paul@paul-moore.com, dsahern@gmail.com, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, rshearma@brocade.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ktkhai@virtuozzo.com, ebiederm@xmission.com, avagin@virtuozzo.com, gorcunov@virtuozzo.com, eric.dumazet@gmail.com, stephen@networkplumber.org, ktkhai@virtuozzo.com Date: Mon, 20 Nov 2017 21:35:58 +0300 Message-ID: <151120295795.3159.4415137499220878655.stgit@localhost.localdomain> In-Reply-To: <151120175301.3159.9577108443167812854.stgit@localhost.localdomain> References: <151120175301.3159.9577108443167812854.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0402CA0020.eurprd04.prod.outlook.com (2603:10a6:3:d0::30) To AM5PR0801MB1332.eurprd08.prod.outlook.com (2603:10a6:203:1f::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eff438e6-e9ec-43cd-7829-08d530458d5a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603258);SRVR:AM5PR0801MB1332; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1332;3:YGED1M8QtGSCBNmhRD9kVFdkcYl2th/yc6JAxzQRd7ZUFC+tB5Gbeh365XzDjSYAQX7s+oWfrqapAp30UHOrcuVuiMdwpircXL/rdpU9BpBDoCMNXoC8vrlTFQkOdXPlNUH2g8dYSAoOtxqFVE74uT1mNs5fS6D9a3sjv8+hIrFHEn4Q7CsRtA98RxhAnYhD/j+zCinwhq2U4aSmLbmDBPAXtYbitvAQIBQ1UnrfMve/nT6uAVu8k1BO5kUtn69i;25:EpX+cEiKgWlIEGPxfMg56FB8wumWWOW1rPKB2EcPaMr8FDLkIClMhvuxSowBtEnHrINrzW3WDISvUQwB4UD+2+cAHLLu+JDVa5HIDc3N3yyKvQtgOuJOA7tTX1V+i6jEGLDHla/3c8swGll5DkSheqbeGv1cyIIEInyzQ2sNHfxiGKJykTIsegivGPtiBHKTYYqlDCtWEFBuEW7VDsHr+CGNvVwia5ge0fJJmomJa1hdHAXkovGw2M4lXsFwUfmg0F6m7MKRdfNOjY33R8GYQD/v6RpZCOXqS060y5iDQHzqrOGNJqwBHQRpMdZ+cjdu5ZeZTPkDqactXCiMgK/bGw==;31:B36ynJvGYIlsQGqk5BTsxXun2EW29CWZBC/ShKThYp+pP5TD36Td2vk5iR40oqWOvD78ottGN5+MEswL0owgLtvbOC616N244qSEXknOcHvsmSehfrJ8/avokIxVURsIZW1BpGDFe4T/mzuWmPFmOUX3AzpwkEWvFpvfh2mXxVp9KCaNMnjpB8cMo8y/ZU0OT4z3jNeHrEsdRE4z7RUHw+EGBzf8dT/G+Mt0C6gWo2c= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1332: X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1332;20:3rewUCvea7nnk7Je9bD687b8UZk6r0ExBh/iFDBjhzvwEI2sVJf9Sd2VXlRhfS3GPtqxAzxwKLQTXiQuA8/0BSiVPMB/hFjCcNoAok68upSg3qW16KZYOLz2SIuN/R2LJaZLKI52tVL4V5fPSqmA0aZ1ZO2gQ1XaxLhPFNujvWUM5LC44Ko1xIrpgwD9d5i2U2BXKkPpkJ3cSDnRuz2WKhuPLeaF2nl7+Odxz46Nya55ae/x/zwqAFElNng8UK1o/fg4n87gGZg83Y9ObPSQb6raaMFwi8xCPQjbVwaqi1cXa0aOuf+tX5y0H6yWjncFFdqJnotNmVY6M4HfaSPOOrnalc4OwCsOgk+qm86yJfq2fxE4LW8xB/mj9u0yOi6uZ9xas6Jnpgd4x+lstKf/zKgZ1U8mzftWo2oHQp+/LPg=;4:3NsPri72Jjlodw96Y4LxHfuhfJSudfsmZxXSylvbWrsAShDgRcpn475o7osCnJtWx0AMlJp4H900TP2WnEAclF8JUADYxr+SUhaEzsxIqFtbDKHkOpFdzeVuZAma1FyJ4VbCZmqsVg4Z+YEms+x30iGxUYLKLraiiA+tL3LfFUdizXItP380o8kPwhVkJfMzVggnAhQVYdKI+W1hPiD74+1h5JbQZFkqqa6DZ1IwZkJomXphKzGmDFU5VGHFWriPXYlRDMrOeemQt1qFJU3L04/c7K8egG/gA7jIDwNj42lAdWSbPrRpWGAL6643cDxU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(3231022)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6041248)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM5PR0801MB1332;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM5PR0801MB1332; X-Forefront-PRVS: 04976078F0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(6009001)(346002)(376002)(199003)(189002)(61506002)(50466002)(76176999)(54356999)(105586002)(3846002)(6116002)(106356001)(5660300001)(101416001)(8936002)(103116003)(7416002)(39060400002)(58126008)(25786009)(230700001)(2950100002)(316002)(53936002)(23676003)(478600001)(2906002)(83506002)(66066001)(55016002)(47776003)(97736004)(9686003)(50986999)(6506006)(81166006)(305945005)(81156014)(16526018)(7736002)(8676002)(575784001)(86362001)(189998001)(33646002)(55236003)(68736007)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:AM5PR0801MB1332;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjEzMzI7MjM6akxVQit6NDRGb1JMUDMzQXBXRHpLNjM3?= =?utf-8?B?blJNTXk2bWZ4RnRlQXB0RXozaks1RHpPdmZRc3U1WUluL3RYSUw3Y1V4L0Zh?= =?utf-8?B?aGdyZXI2TXV3S2FscmZSYm9EVnV1TkQvaDJ2K01GeSttR01lNlFmT3JybW1t?= =?utf-8?B?MExBRGFUaWVENzV2S1g3cTMvenN3VmFEdUw4Z2pwSFdNTGk0NzVuNE1rb2N6?= =?utf-8?B?d05FZzJsb0pYUUxrMkxXbXpBM25WKytBTHZqODF4SExjYXZUelpHNmE3ZnVD?= =?utf-8?B?RVczcHJMNFU4MkVyOXdvLzUyWnMxVjBaTzV3M3lQWDBjYzhqWDhLWWQ1c2hq?= =?utf-8?B?S2JrUnRtSWhIL0MxMmlnTG1mU2hkZDlpYUJBUFc3TGNUV1o5ckpLZXhoc0NK?= =?utf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hm2C3QueoAHQ8s=;7:mp5DU1HU2pKSMlxFU7DPr3JGk5MV7Ji9JWNjinkInnlOgkLBVYFAnVxpfPh/Sk8I5PGc2AfCPz6ZpTeoReyw8Iwh7HhkcWhmC/G/PQR6obUQLJfw12IhuOWApjfKH9mmLulbo8Yc6bLevzpkPYzPE7Ni7AzJ8ZvxAd6t0W0BmNEtGSQFeTC4V6r46VoDFq3Zry58bmLBSYjIIPZnG4d7Nhq22lV+xEoW54dB4Nn4gN4XWhi09QDXlz6mGviCu6rJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0801MB1332;20:F3VW/6ItI40yN9k74jRnVnVqXw4tWFNwLiWb1faWnozRKuN45avp+V7PRpeqDzrKMRVzglPnONTQCa2prWjcYQkIGvV+sGkXHQwVg7bum2ux4M2A2aCRUrkoNpFBs5Sci8pO5NLk3kTblbvbtT0lqiK8sNj8rvPDoCxlsaleQKY= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2017 18:36:00.9091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eff438e6-e9ec-43cd-7829-08d530458d5a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1332 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arp_net_ops just addr/removes /proc entry. devinet_ops allocates and frees duplicate of init_net tables and (un)registers sysctl entries. fib_net_ops allocates and frees pernet tables, creates/destroys netlink socket and (un)initializes /proc entries. Foreign pernet_operations do not touch them. ip_rt_proc_ops only modifies pernet /proc entries. xfrm_net_ops creates/destroys /proc entries, allocates/frees pernet statistics, hashes and tables, and (un)initializes sysctl files. These are not touched by foreigh pernet_operations xfrm4_net_ops allocates/frees private pernet memory, and configures sysctls. sysctl_route_ops creates/destroys sysctls. rt_genid_ops only initializes fields of just allocated net. ipv4_inetpeer_ops allocated/frees net private memory. igmp_net_ops just creates/destroys /proc files and socket, noone else interested in. tcp_sk_ops seems to be safe, because tcp_sk_init() does not depend on any other pernet_operations modifications. Iteration over hash table in inet_twsk_purge() is made under RCU lock, and it's safe to iterate the table this way. Removing from the table happen from inet_twsk_deschedule_put(), but this function is safe without any extern locks, as it's synchronized inside itself. There are many examples, it's used in different context. So, it's safe to leave tcp_sk_exit_batch() unlocked. tcp_net_metrics_ops is synchronized on tcp_metrics_lock and safe. udplite4_net_ops only creates/destroys pernet /proc file. icmp_sk_ops creates percpu sockets, not touched by foreign pernet_operations. ipmr_net_ops creates/destroys pernet fib tables, (un)registers fib rules and /proc files. This seem to be safe to execute in parallel with foreign pernet_operations. af_inet_ops just sets up default parameters of newly created net. ipv4_mib_ops creates and destroys pernet percpu statistics. raw_net_ops, tcp4_net_ops, udp4_net_ops, ping_v4_net_ops and ip_proc_ops only create/destroy pernet /proc files. ip4_frags_ops creates and destroys sysctl file. So, it's safe to make the pernet_operations async. Signed-off-by: Kirill Tkhai --- net/ipv4/af_inet.c | 2 ++ net/ipv4/arp.c | 1 + net/ipv4/devinet.c | 1 + net/ipv4/fib_frontend.c | 1 + net/ipv4/icmp.c | 1 + net/ipv4/igmp.c | 1 + net/ipv4/ip_fragment.c | 1 + net/ipv4/ipmr.c | 1 + net/ipv4/ping.c | 1 + net/ipv4/proc.c | 1 + net/ipv4/raw.c | 1 + net/ipv4/route.c | 4 ++++ net/ipv4/tcp_ipv4.c | 2 ++ net/ipv4/tcp_metrics.c | 1 + net/ipv4/udp.c | 1 + net/ipv4/udplite.c | 1 + net/ipv4/xfrm4_policy.c | 1 + net/xfrm/xfrm_policy.c | 1 + 18 files changed, 23 insertions(+) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index ce4aa827be05..d1a2e9afbb50 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1697,6 +1697,7 @@ static __net_exit void ipv4_mib_exit_net(struct net *net) static __net_initdata struct pernet_operations ipv4_mib_ops = { .init = ipv4_mib_init_net, .exit = ipv4_mib_exit_net, + .async = true, }; static int __init init_ipv4_mibs(void) @@ -1750,6 +1751,7 @@ static __net_exit void inet_exit_net(struct net *net) static __net_initdata struct pernet_operations af_inet_ops = { .init = inet_init_net, .exit = inet_exit_net, + .async = true, }; static int __init init_inet_pernet_ops(void) diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index a8d7c5a9fb05..19bcd10a928b 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1443,6 +1443,7 @@ static void __net_exit arp_net_exit(struct net *net) static struct pernet_operations arp_net_ops = { .init = arp_net_init, .exit = arp_net_exit, + .async = true, }; static int __init arp_proc_init(void) diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index a4573bccd6da..c359bda18ff5 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -2474,6 +2474,7 @@ static __net_exit void devinet_exit_net(struct net *net) static __net_initdata struct pernet_operations devinet_ops = { .init = devinet_init_net, .exit = devinet_exit_net, + .async = true, }; static struct rtnl_af_ops inet_af_ops __read_mostly = { diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index f52d27a422c3..6eb4aa5ee66f 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -1361,6 +1361,7 @@ static void __net_exit fib_net_exit(struct net *net) static struct pernet_operations fib_net_ops = { .init = fib_net_init, .exit = fib_net_exit, + .async = true, }; void __init ip_fib_init(void) diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 1617604c9284..cc56efa64d5c 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -1257,6 +1257,7 @@ static int __net_init icmp_sk_init(struct net *net) static struct pernet_operations __net_initdata icmp_sk_ops = { .init = icmp_sk_init, .exit = icmp_sk_exit, + .async = true, }; int __init icmp_init(void) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index ab183af0b5b6..ee63dae1f48e 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -3004,6 +3004,7 @@ static void __net_exit igmp_net_exit(struct net *net) static struct pernet_operations igmp_net_ops = { .init = igmp_net_init, .exit = igmp_net_exit, + .async = true, }; #endif diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index bbf1b94942c0..5e843ae5e468 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -885,6 +885,7 @@ static void __net_exit ipv4_frags_exit_net(struct net *net) static struct pernet_operations ip4_frags_ops = { .init = ipv4_frags_init_net, .exit = ipv4_frags_exit_net, + .async = true, }; void __init ipfrag_init(void) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 40a43ad294cb..64299e2dd6a3 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -3330,6 +3330,7 @@ static void __net_exit ipmr_net_exit(struct net *net) static struct pernet_operations ipmr_net_ops = { .init = ipmr_net_init, .exit = ipmr_net_exit, + .async = true, }; int __init ip_mr_init(void) diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index b8f0db54b197..0164def9c808 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -1204,6 +1204,7 @@ static void __net_exit ping_v4_proc_exit_net(struct net *net) static struct pernet_operations ping_v4_net_ops = { .init = ping_v4_proc_init_net, .exit = ping_v4_proc_exit_net, + .async = true, }; int __init ping_proc_init(void) diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 9f37c4727861..4fa547d896ec 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -552,6 +552,7 @@ static __net_exit void ip_proc_exit_net(struct net *net) static __net_initdata struct pernet_operations ip_proc_ops = { .init = ip_proc_init_net, .exit = ip_proc_exit_net, + .async = true, }; int __init ip_misc_proc_init(void) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 33b70bfd1122..b02e58125033 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -1135,6 +1135,7 @@ static __net_exit void raw_exit_net(struct net *net) static __net_initdata struct pernet_operations raw_net_ops = { .init = raw_init_net, .exit = raw_exit_net, + .async = true, }; int __init raw_proc_init(void) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 43b69af242e1..b5a173aae851 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -420,6 +420,7 @@ static void __net_exit ip_rt_do_proc_exit(struct net *net) static struct pernet_operations ip_rt_proc_ops __net_initdata = { .init = ip_rt_do_proc_init, .exit = ip_rt_do_proc_exit, + .async = true, }; static int __init ip_rt_proc_init(void) @@ -2996,6 +2997,7 @@ static __net_exit void sysctl_route_net_exit(struct net *net) static __net_initdata struct pernet_operations sysctl_route_ops = { .init = sysctl_route_net_init, .exit = sysctl_route_net_exit, + .async = true, }; #endif @@ -3009,6 +3011,7 @@ static __net_init int rt_genid_init(struct net *net) static __net_initdata struct pernet_operations rt_genid_ops = { .init = rt_genid_init, + .async = true, }; static int __net_init ipv4_inetpeer_init(struct net *net) @@ -3034,6 +3037,7 @@ static void __net_exit ipv4_inetpeer_exit(struct net *net) static __net_initdata struct pernet_operations ipv4_inetpeer_ops = { .init = ipv4_inetpeer_init, .exit = ipv4_inetpeer_exit, + .async = true, }; #ifdef CONFIG_IP_ROUTE_CLASSID diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index c6bc0c4d19c6..36f5434365f8 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2366,6 +2366,7 @@ static void __net_exit tcp4_proc_exit_net(struct net *net) static struct pernet_operations tcp4_net_ops = { .init = tcp4_proc_init_net, .exit = tcp4_proc_exit_net, + .async = true, }; int __init tcp4_proc_init(void) @@ -2552,6 +2553,7 @@ static struct pernet_operations __net_initdata tcp_sk_ops = { .init = tcp_sk_init, .exit = tcp_sk_exit, .exit_batch = tcp_sk_exit_batch, + .async = true, }; void __init tcp_v4_init(void) diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 7097f92d16e5..01a6926313ff 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c @@ -1027,6 +1027,7 @@ static void __net_exit tcp_net_metrics_exit_batch(struct list_head *net_exit_lis static __net_initdata struct pernet_operations tcp_net_metrics_ops = { .init = tcp_net_metrics_init, .exit_batch = tcp_net_metrics_exit_batch, + .async = true, }; void __init tcp_metrics_init(void) diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index e4ff25c947c5..8e8d9ffb7e8d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -2767,6 +2767,7 @@ static void __net_exit udp4_proc_exit_net(struct net *net) static struct pernet_operations udp4_net_ops = { .init = udp4_proc_init_net, .exit = udp4_proc_exit_net, + .async = true, }; int __init udp4_proc_init(void) diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c index 59f10fe9782e..407aaab97383 100644 --- a/net/ipv4/udplite.c +++ b/net/ipv4/udplite.c @@ -105,6 +105,7 @@ static void __net_exit udplite4_proc_exit_net(struct net *net) static struct pernet_operations udplite4_net_ops = { .init = udplite4_proc_init_net, .exit = udplite4_proc_exit_net, + .async = true, }; static __init int udplite4_proc_init(void) diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 05017e2c849c..753f526cf9db 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -365,6 +365,7 @@ static void __net_exit xfrm4_net_exit(struct net *net) static struct pernet_operations __net_initdata xfrm4_net_ops = { .init = xfrm4_net_init, .exit = xfrm4_net_exit, + .async = true, }; static void __init xfrm4_policy_init(void) diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 9542975eb2f9..f5185538a3e9 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2961,6 +2961,7 @@ static void __net_exit xfrm_net_exit(struct net *net) static struct pernet_operations __net_initdata xfrm_net_ops = { .init = xfrm_net_init, .exit = xfrm_net_exit, + .async = true, }; void __init xfrm_init(void)