Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5452037imm; Tue, 16 Oct 2018 10:25:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV61LuXbF8Vd/9VyQPyxaWqJjBml0UzA6dF2imIm4hZSgn06WcHykHAOZs1yjOZqhgyN5CsXb X-Received: by 2002:a17:902:3324:: with SMTP id a33-v6mr22346158plc.208.1539710739250; Tue, 16 Oct 2018 10:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710739; cv=none; d=google.com; s=arc-20160816; b=EryJ+bR3tWYZNgam4apvDZWt7rcect5lLRpDwjQTyKTMkrZ5bU10hgRwlVCPjBhMTc KhaaJC0R7w/CZwq3OajkDpO2YeBSsEhwLmrJHv6zXCdk0Eduxrs9EOJvRNz4g/LL0trM Ta0IAOSxbXDKBACG03in4BX7XHMNswOSA59DcdUbG6iWiUE3dVQAuD8b7sMQvXCq8KO0 tkk9i4wAwMWyldtfN3Zg4BhEvPt7Bnk+Lefd07lhLcPpNaJY8rig6Hbsuir5oKVK0Fx6 kPLatH3FNKLXgxGB3+nCtAF8GbOHln0qH3tTHsmdgBWFbWqtKW/4L10sxDdiBNEdazcN Kaag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sp54hCsCyJDU6vUPynr5rGCbgSRdChucenoLUinaccc=; b=gFqtq9TNAU2DMsmtZXWSqgfn3SMjyuA/1WK9ioh6SYnYEp81r3vDzv+SdjjmigEQ0J fAcwEPiwK0JNOTolLb9pBaWH2CJghkDWgi3XHz4ne1wBF/3GGIKdsexJfHO9xoBDK1kA tFEARrYBJHuPuK94DDuxAekTbiEOSRyUza5Rpu/9p6M5VOFohHTIOO0UVHEcYm8wwYf7 tCBdCig0lRoM+cAfLrS/pv+X62J1r/UqSkldmdIIzPN1xgTobmL0EKk0CXVY8aWZLNVQ ltu5CM8lYzpLSW/P9PBCvrb+vkQF1Yud8xqGT3ObYHwJKeYEmRGl1np2LlFSVIndIkRn XSHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0VKj9It; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1-v6si14180338pgh.244.2018.10.16.10.25.23; Tue, 16 Oct 2018 10:25:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0VKj9It; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731776AbeJQBQN (ORCPT + 99 others); Tue, 16 Oct 2018 21:16:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:34916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbeJQBQM (ORCPT ); Tue, 16 Oct 2018 21:16:12 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4EE5F20658; Tue, 16 Oct 2018 17:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710686; bh=xLk2STXAY7CnSoXlPjz4SHstfhW7AXwGIeXZEqpMmuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y0VKj9ItMJyCui4eHcdMMkEtn2WqEBhQZBRwQyxu7VuXGopksj972Fmhh9UAfDK69 BCCy7XDgkQw8KacCgujCwZCbdRA1UB1jiMnzrnSMKKGvRg0ejLcJ6WTysA4BBQFk7D oZF1cKsZRw79RBfFpFEZy/YOOIys2/U2fu3ks9Dc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: [PATCH 4.9 47/71] inet: frags: refactor lowpan_net_frag_init() Date: Tue, 16 Oct 2018 19:09:44 +0200 Message-Id: <20181016170541.745869834@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet We want to call lowpan_net_frag_init() earlier. Similar to commit "inet: frags: refactor ipv6_frag_init()" This is a prereq to "inet: frags: use rhashtables for reassembly units" Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 807f1844df4ac23594268fa9f41902d0549e92aa) Signed-off-by: Greg Kroah-Hartman --- net/ieee802154/6lowpan/reassembly.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) --- a/net/ieee802154/6lowpan/reassembly.c +++ b/net/ieee802154/6lowpan/reassembly.c @@ -614,14 +614,6 @@ int __init lowpan_net_frag_init(void) { int ret; - ret = lowpan_frags_sysctl_register(); - if (ret) - return ret; - - ret = register_pernet_subsys(&lowpan_frags_ops); - if (ret) - goto err_pernet; - lowpan_frags.hashfn = lowpan_hashfn; lowpan_frags.constructor = lowpan_frag_init; lowpan_frags.destructor = NULL; @@ -631,11 +623,21 @@ int __init lowpan_net_frag_init(void) lowpan_frags.frags_cache_name = lowpan_frags_cache_name; ret = inet_frags_init(&lowpan_frags); if (ret) - goto err_pernet; + goto out; + + ret = lowpan_frags_sysctl_register(); + if (ret) + goto err_sysctl; + ret = register_pernet_subsys(&lowpan_frags_ops); + if (ret) + goto err_pernet; +out: return ret; err_pernet: lowpan_frags_sysctl_unregister(); +err_sysctl: + inet_frags_fini(&lowpan_frags); return ret; }