From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH 2/3] net: Register af_inet_ops earlier Date: Thu, 20 Sep 2018 12:12:01 +0300 Message-ID: <153743469969.21312.2316847616468846087.stgit@localhost.localdomain> References: <153743451940.21312.15708795592586962785.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: davem@davemloft.net, xiyou.wangcong@gmail.com, yoshfuji@linux-ipv6.org, ktkhai@virtuozzo.com, avagin@virtuozzo.com, edumazet@google.com, ebiederm@xmission.com, netdev@vger.kernel.org Return-path: Received: from mail-ve1eur01on0098.outbound.protection.outlook.com ([104.47.1.98]:31328 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726788AbeITOyh (ORCPT ); Thu, 20 Sep 2018 10:54:37 -0400 In-Reply-To: <153743451940.21312.15708795592586962785.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: This function just initializes locks and defaults. Let register it before other pernet operation, since some of them potentially may relay on that. Signed-off-by: Kirill Tkhai --- net/ipv4/af_inet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index f4ecbe0aaf1a..bbd3a072ffea 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1938,6 +1938,9 @@ static int __init inet_init(void) for (q = inetsw_array; q < &inetsw_array[INETSW_ARRAY_LEN]; ++q) inet_register_protosw(q); + if (init_inet_pernet_ops()) + pr_crit("%s: Cannot init ipv4 inet pernet ops\n", __func__); + /* * Set the ARP module up */ @@ -1975,9 +1978,6 @@ static int __init inet_init(void) if (ip_mr_init()) pr_crit("%s: Cannot init ipv4 mroute\n", __func__); #endif - - if (init_inet_pernet_ops()) - pr_crit("%s: Cannot init ipv4 inet pernet ops\n", __func__); /* * Initialise per-cpu ipv4 mibs */