Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5453520imm; Tue, 16 Oct 2018 10:27:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV60n8Z8xUo19JwunoVaoVO3MJg1nW9zpgq3xHs8soywd7vOmZJu7OzprBqruKpzqbL8uJQ7k X-Received: by 2002:a62:f20f:: with SMTP id m15-v6mr22673446pfh.244.1539710820651; Tue, 16 Oct 2018 10:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710820; cv=none; d=google.com; s=arc-20160816; b=wOD73BrlNlWMXErdRPPf98axdHK3iDL28H9qv3mXzRwWpdGRcZoUYNf54he+Sv3Ab9 KhxQBsKwkawO2vZUyZiVa07pREbvTfWu1wqG6rolj46ZjSM99LBxblV+8T0BxFM9qFqk 0ptgP5rb8dxXVs8Qs7AKgkjIQXyoViB8OU3YsrMo1TT5YOZlaMrCvDL2QX9iY+Krh/Sg gn095dZej5lB5JXKqJA12W22wkvl7AOeVxwLLekVEr/frfBQfVNWZMFolILJuznjJPXn qLPmkJ59sHrsfYWs/ci68aSOPbYMXiv/OaWXkXGaGEyhRh38DgANHKLIw92pBNx4f0mP yqDw== 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=nr+WaCvEMti1uqc4VKXhab1g0cqExV/wmVqREz8/RkA=; b=CLFAGLATFlwpgJ/S27pWD364J30vQgWBOlJiWur20pUFa3sL2WuBtYH8HIzJJyoHiP IHvpQAcnNNv6Nflps9Z7rSMSqZG8zZ0Kyszo417IwIM1KvYV9JXj5xHGj7kdJIQ+dvdr EjrSNpg3Z3xfZHBG3JEVxg4GG77Ae+HUW9TKf49vN8I1ITw0FJ/uyFetISPhqcN1iAJe t+lKTjbUiRt7KBRMA8U73cO0onSuyILXa6VitETbv9Q+sFok7ukD9UZslNuojAmJiVFd +iLWtXtqhG2ihsF1EYR+XV0UIAPVeZL6TZAFYtxPAeVB4tVk3hLPTc2s3XvLXp3Owlbf lkjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cdLDLMEh; 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 s17-v6si14621764pgk.140.2018.10.16.10.26.44; Tue, 16 Oct 2018 10:27:00 -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=cdLDLMEh; 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 S1732163AbeJQBRV (ORCPT + 99 others); Tue, 16 Oct 2018 21:17:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:36132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731313AbeJQBRU (ORCPT ); Tue, 16 Oct 2018 21:17:20 -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 A934C204EC; Tue, 16 Oct 2018 17:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710754; bh=G3jU2halCrKpWU6Bh9J4MMSPZ+nh4BapmtSww6Y8dts=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cdLDLMEh+LPYTKRyGqbSJpn/o31R87ThYLEyN1nWAqkoymC8r+vzuPNwUdRlSImKh sBL5900a3q9F0OahVrP/gOCV97YMaOiueKzrcMMiOw87JyYqh9VdHyxoQoNkKHXiu+ L+WiJxUIndQqhju+Dk48XwE2PS9Z5enEkRUpnub8= 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 53/71] inet: frags: remove inet_frag_maybe_warn_overflow() Date: Tue, 16 Oct 2018 19:09:50 +0200 Message-Id: <20181016170542.025259599@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 This function is obsolete, after rhashtable addition to inet defrag. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller (cherry picked from commit 2d44ed22e607f9a285b049de2263e3840673a260) Signed-off-by: Greg Kroah-Hartman --- include/net/inet_frag.h | 2 -- net/ieee802154/6lowpan/reassembly.c | 5 ++--- net/ipv4/inet_fragment.c | 11 ----------- net/ipv4/ip_fragment.c | 5 ++--- net/ipv6/netfilter/nf_conntrack_reasm.c | 5 ++--- net/ipv6/reassembly.c | 5 ++--- 6 files changed, 8 insertions(+), 25 deletions(-) --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -109,8 +109,6 @@ void inet_frags_exit_net(struct netns_fr void inet_frag_kill(struct inet_frag_queue *q); void inet_frag_destroy(struct inet_frag_queue *q); struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key); -void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, - const char *prefix); static inline void inet_frag_put(struct inet_frag_queue *q) { --- a/net/ieee802154/6lowpan/reassembly.c +++ b/net/ieee802154/6lowpan/reassembly.c @@ -83,10 +83,9 @@ fq_find(struct net *net, const struct lo struct inet_frag_queue *q; q = inet_frag_find(&ieee802154_lowpan->frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct lowpan_frag_queue, q); } --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c @@ -217,14 +217,3 @@ struct inet_frag_queue *inet_frag_find(s return inet_frag_create(nf, key); } EXPORT_SYMBOL(inet_frag_find); - -void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, - const char *prefix) -{ - static const char msg[] = "inet_frag_find: Fragment hash bucket" - " list length grew over limit. Dropping fragment.\n"; - - if (PTR_ERR(q) == -ENOBUFS) - net_dbg_ratelimited("%s%s", prefix, msg); -} -EXPORT_SYMBOL(inet_frag_maybe_warn_overflow); --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -219,10 +219,9 @@ static struct ipq *ip_find(struct net *n struct inet_frag_queue *q; q = inet_frag_find(&net->ipv4.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct ipq, q); } --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -177,10 +177,9 @@ static struct frag_queue *fq_find(struct struct inet_frag_queue *q; q = inet_frag_find(&net->nf_frag.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct frag_queue, q); } --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c @@ -154,10 +154,9 @@ fq_find(struct net *net, __be32 id, cons key.iif = 0; q = inet_frag_find(&net->ipv6.frags, &key); - if (IS_ERR_OR_NULL(q)) { - inet_frag_maybe_warn_overflow(q, pr_fmt()); + if (!q) return NULL; - } + return container_of(q, struct frag_queue, q); }