From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 10/25] net: Move sysctl_pernet_ops to pernet_sys list Date: Fri, 17 Nov 2017 21:28:53 +0300 Message-ID: <151094333307.20009.13442157680174781843.stgit@localhost.localdomain> References: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 Return-path: Received: from mail-ve1eur01on0098.outbound.protection.outlook.com ([104.47.1.98]:60865 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966265AbdKQS3B (ORCPT ); Fri, 17 Nov 2017 13:29:01 -0500 In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: This patch starts to convert pernet_subsys, registered from core initcalls. Since net/socket.o is the first linked file in net/Makefile, its core initcalls execute the first. sysctl_pernet_ops is the first pernet_subsys, registered from sock_init(), so it goes ahead of others, registered via core_initcall(). Methods sysctl_net_init() and sysctl_net_exit() initialize net::sysctls of a namespace. pernet_operations::init()/exit() methods from the rest of the list do not touch net::sysctls of strangers, so it's safe to execute sysctl_pernet_ops's methods in parallel with any other pernet_operations. Signed-off-by: Kirill Tkhai --- net/sysctl_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sysctl_net.c b/net/sysctl_net.c index 9aed6fe1bf1a..1b91db88e54a 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -103,7 +103,7 @@ __init int net_sysctl_init(void) net_header = register_sysctl("net", empty); if (!net_header) goto out; - ret = register_pernet_subsys(&sysctl_pernet_ops); + ret = register_pernet_sys(&sysctl_pernet_ops); if (ret) goto out1; out: