From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 14/25] net: Move net_defaults_ops to pernet_sys list Date: Fri, 17 Nov 2017 21:29:31 +0300 Message-ID: <151094337170.20009.15836554813104206531.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-db5eur01on0107.outbound.protection.outlook.com ([104.47.2.107]:6560 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161325AbdKQS3m (ORCPT ); Fri, 17 Nov 2017 13:29:42 -0500 In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: According to net/core/Makefile, net/core/net_namespace.o core initcalls execute right after net/core/sock.o. net_defaults_ops introduces only net_defaults_init_net method, and it acts on net::core::sysctl_somaxconn, which is not interested the rest of pernet_subsys and pernet_device lists. Then, move it to pernet_sys. Signed-off-by: Kirill Tkhai --- net/core/net_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 2e8295aa7003..7fc9d44c1817 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -371,7 +371,7 @@ static struct pernet_operations net_defaults_ops = { static __init int net_defaults_init(void) { - if (register_pernet_subsys(&net_defaults_ops)) + if (register_pernet_sys(&net_defaults_ops)) panic("Cannot initialize net default settings"); return 0;