Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp247523imj; Thu, 7 Feb 2019 03:46:27 -0800 (PST) X-Google-Smtp-Source: AHgI3IbUW4yKb3pTSnPZPkBDl6z3EYV2RUcKEVY1yUxN+n+c0Tq63SPh5wqresQSaeEaDJsIMmOA X-Received: by 2002:a17:902:2867:: with SMTP id e94mr16285848plb.264.1549539987687; Thu, 07 Feb 2019 03:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549539987; cv=none; d=google.com; s=arc-20160816; b=zVwOUxj6s4Q8/ITxO7WoBwbBTbKi+Fstqfj9y6mF07PaJuI/u99ZKwdZYl7EXMFRGU Izftouj5wxyt6NrwZD9/DFLT1A5es2ye+nIYGcDiBV8Bg7oJwA/bOVmxmjUiV39/eO7x DTJOUSdxhF++jb7ni0SYYQ6Jm7wmJlzxmzrUqRzcZIq0Qfa8OlUm49iJvP7D9SoYp8eq AksMtk9HOESiF8st04OwwP8bVWSYVLfBM3CfQUlKhWZ6JS+1XXJ/9JKrcMrfBBBtvtQs EGnOZTHudtNDmVVYItDnmUMJ5OSiX7328K/DvBm3JNF/kxlGJKiN9XVX70tOHwHnRUlc lz7A== 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=RqrQK0OdDTJCmHD+MouuEQep4G116H2HKdWCuYGhqx8=; b=YE0zF9/c0vqykuaJGZ5jaRePnVDyOtvTgGMKqM6JPmo9n5Gf7vbR5o33jXjuFD1HNm 1DKO680a3vXS9gh9sc8F9FXSZA+ZWF107UnY9lJxW9KQsx6Qs3a2ZMQ+Vd1tQJX5iZte poIFW7HWMuNQ/AWBI6Qur9d05qPkJKs2/YnPRmMKoLGVdRhs5NWUqcN44S8ZXZlCIqQi nXRQPHck34c+ratNcvUk15vFL3EGYAedx4DrR4BDo7VMM7OVgOG+Tsl6kxpt7I6RnUl4 07fcptOHKHXQMHAU4V/d0JyJTfq6TZvMuUyFNuNlvfQZAR1KROy6uu+RA+Uh77mINYso wv0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m3VKAQTe; 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 f21si8094627pgb.371.2019.02.07.03.46.12; Thu, 07 Feb 2019 03:46:27 -0800 (PST) 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=m3VKAQTe; 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 S1727097AbfBGLmj (ORCPT + 99 others); Thu, 7 Feb 2019 06:42:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:60878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbfBGLmi (ORCPT ); Thu, 7 Feb 2019 06:42:38 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 C10622190A; Thu, 7 Feb 2019 11:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549539757; bh=aYVdSjKz6mOyiXztVrcLXAJSrakBXsyk99vZVM4aJTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m3VKAQTeVf9jLxjqt4mBMu4ElPaihV1wtWmTsiskV9WNLMlNEzfNnwOX04U+FkOES c43vEx/0zhpHw8BHjyDhNmCza8OEmEN7rC4Rub7Kw3PJ6lx+Vl5+DJZuRriOrK02+V g+SZzyrALvI1r7/ZDtcHvvfgOAHFbriuJigdruH0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "David S. Miller" , Ben Hutchings Subject: [PATCH 4.4 04/34] inet: frags: refactor ipv6_frag_init() Date: Thu, 7 Feb 2019 12:41:46 +0100 Message-Id: <20190207113025.738735210@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207113025.552605181@linuxfoundation.org> References: <20190207113025.552605181@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet commit 5b975bab23615cd0fdf67af6c9298eb01c4b9f61 upstream. 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 [bwh: Backported to 4.4: Also delete a redundant assignment to ip6_frags.skb_free] Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- net/ipv6/reassembly.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -739,10 +739,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; @@ -751,17 +762,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.skb_free = 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 +769,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; }