From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH v3 03/30] inet: frags: refactor ipfrag_init() Date: Thu, 13 Sep 2018 07:58:35 -0700 Message-ID: <20180913145902.17531-4-sthemmin@microsoft.com> References: <20180913145902.17531-1-sthemmin@microsoft.com> Cc: netdev@vger.kernel.org, stable@vger.kernel.org, edumazet@google.com To: davem@davemloft.net, gregkh@linuxfoundation.org Return-path: Received: from mail-pl1-f194.google.com ([209.85.214.194]:41181 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbeIMUJH (ORCPT ); Thu, 13 Sep 2018 16:09:07 -0400 Received: by mail-pl1-f194.google.com with SMTP id b12-v6so2719489plr.8 for ; Thu, 13 Sep 2018 07:59:14 -0700 (PDT) In-Reply-To: <20180913145902.17531-1-sthemmin@microsoft.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet We need to call inet_frags_init() before register_pernet_subsys(), as a prereq for following patch ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 483a6e4fa055123142d8956866fe2aa9c98d546d) --- net/ipv4/ip_fragment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index c32718b00761..9d0b08c8ee00 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -900,8 +900,6 @@ static struct pernet_operations ip4_frags_ops = { void __init ipfrag_init(void) { - ip4_frags_ctl_register(); - register_pernet_subsys(&ip4_frags_ops); ip4_frags.hashfn = ip4_hashfn; ip4_frags.constructor = ip4_frag_init; ip4_frags.destructor = ip4_frag_free; @@ -911,4 +909,6 @@ void __init ipfrag_init(void) ip4_frags.frags_cache_name = ip_frag_cache_name; if (inet_frags_init(&ip4_frags)) panic("IP: failed to allocate ip4_frags cache\n"); + ip4_frags_ctl_register(); + register_pernet_subsys(&ip4_frags_ops); } -- 2.18.0