Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5453160imm; Tue, 16 Oct 2018 10:26:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV62lk4uWkFyYA/auYs5mZcwOkK27fWZjsaRREwPgwJnnklGe8O+BKyzhctdz2PJSYQX7sWau X-Received: by 2002:a62:fd0b:: with SMTP id p11-v6mr22592046pfh.167.1539710800238; Tue, 16 Oct 2018 10:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710800; cv=none; d=google.com; s=arc-20160816; b=IjOcvrr2e+qognKI113pMxOmM/wy7VOCJDzjbL35BqbxJLfpjAzool/9iRrVcpRzRK Sr3xzGEyOvZb32nhPRMM7/qxtbpTnMraz+9uQVXUsh2/MKsuBhRpFTaDYRi1tNPE6nhb rTSSGWraBc1oId7wirw/jD/rwHbJ/9Pie5iX1U5jLK+VxduvbP6IflX2Vd0nSI26ZkOv nsaDojHadG1DVhoADH8jvDp4XnaJJivHVBozZQoJL6425xy0j+4lgF3Vq6i066uxB+gI gMUCMv8xPYqK+o86CWPLpGmJsAU8mnvV5aWgcBT08d2gM4JVfR5I+BULBQCPfCb5gB7V SZHg== 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=xNzJ/fshvqNK8w+MnmYkJHpQBSUmF7pa+TlJZPDibZE=; b=GLsba1LBhYO0zhS1c4Ithhd4OHp9E6YUymG40VDgdoy4G1K/ZI2PJfW30Mrl86XE77 hVxNl89E4nMmxzZk3aG5zHPxTYDOEdVM26NJRWgU0jZoO8u6WCL5PPIWL8+fwoYXuaeX zTWsxTHgakzk5SioK5fr9LD30z1rU2fEWOzoPiI+o5iNZwlPnIWJaSKmhxWzPkFNHsuI e2m+M/0FmZdCD7Jh2omOBw1wUe7vmSYtqVUfARniCwhSIcD9IcF9UUEKJZ6iHbHWSb5b qhGgzpYIcyIBCbgWk9V6ZBpHkVKtTRwc/bSIu6QfGgwl7rXEMwWWKI7Kys57BGcdSTEM /qjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k9aduYc3; 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 b1-v6si2653708pld.419.2018.10.16.10.26.24; Tue, 16 Oct 2018 10:26:40 -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=k9aduYc3; 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 S1732221AbeJQBR3 (ORCPT + 99 others); Tue, 16 Oct 2018 21:17:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:36280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730677AbeJQBR2 (ORCPT ); Tue, 16 Oct 2018 21:17:28 -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 CC68B20866; Tue, 16 Oct 2018 17:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710762; bh=HpgkwsSyg/rzpd9XQxxPjNDU5Wbp1wih1xRnsjpjQwk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k9aduYc3fWMzDEX2ELQkkBHlAx+AzJIciAKcMy9E1/CERVZkFvjoV+nb2Aup/wMxz CgtUHYkMuQDfsZMcsjK0q0WEDXMT4YbzslNpcRaUzRXcjEoP3ao8flPuraGU0DsAhX TtKemo+Gb1W90g6EVgdk296IXDLw8axbONq1Mz58= 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 46/71] inet: frags: refactor ipv6_frag_init() Date: Tue, 16 Oct 2018 19:09:43 +0200 Message-Id: <20181016170541.686036838@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 inet_frags_init() earlier. 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 5b975bab23615cd0fdf67af6c9298eb01c4b9f61) Signed-off-by: Greg Kroah-Hartman --- net/ipv6/reassembly.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -740,10 +740,21 @@ int __init ipv6_frag_init(void) { int ret; - ret = inet6_add_protocol(&frag_protocol, IPPROTO_FRAGMENT); + ip6_frags.hashfn = ip6_hashfn; + ip6_frags.constructor = ip6_frag_init; + ip6_frags.destructor = NULL; + ip6_frags.qsize = sizeof(struct frag_queue); + ip6_frags.match = ip6_frag_match; + ip6_frags.frag_expire = ip6_frag_expire; + ip6_frags.frags_cache_name = ip6_frag_cache_name; + ret = inet_frags_init(&ip6_frags); if (ret) goto out; + ret = inet6_add_protocol(&frag_protocol, IPPROTO_FRAGMENT); + if (ret) + goto err_protocol; + ret = ip6_frags_sysctl_register(); if (ret) goto err_sysctl; @@ -752,16 +763,6 @@ int __init ipv6_frag_init(void) if (ret) goto err_pernet; - ip6_frags.hashfn = ip6_hashfn; - ip6_frags.constructor = ip6_frag_init; - ip6_frags.destructor = NULL; - ip6_frags.qsize = sizeof(struct frag_queue); - ip6_frags.match = ip6_frag_match; - ip6_frags.frag_expire = ip6_frag_expire; - ip6_frags.frags_cache_name = ip6_frag_cache_name; - ret = inet_frags_init(&ip6_frags); - if (ret) - goto err_pernet; out: return ret; @@ -769,6 +770,8 @@ err_pernet: ip6_frags_sysctl_unregister(); err_sysctl: inet6_del_protocol(&frag_protocol, IPPROTO_FRAGMENT); +err_protocol: + inet_frags_fini(&ip6_frags); goto out; }