Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbdFUR67 (ORCPT ); Wed, 21 Jun 2017 13:58:59 -0400 Received: from prod-mx.aristanetworks.com ([162.210.130.12]:49593 "EHLO prod-mx.aristanetworks.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbdFUR65 (ORCPT ); Wed, 21 Jun 2017 13:58:57 -0400 From: Julien Gomes To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Julien Gomes Subject: [PATCH net-next 1/2] ipmr: restrict mroute "queue full" warning to related error values Date: Wed, 21 Jun 2017 10:58:10 -0700 Message-Id: <20170621175811.16940-1-julien@arista.com> X-Mailer: git-send-email 2.13.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 30 When sending a cache report on mroute_sk, mroute will emit a "pending queue full" warning for every error value returned by sock_queue_rcv_skb(). This warning can be misleading, for example on the EPERM error value that sk_filter() can return. Restricting this warning to only ENOMEM or ENOBUFS seems more appropriate. Signed-off-by: Julien Gomes --- net/ipv4/ipmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index a1d521be612b..ace12cddb9de 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1068,7 +1068,8 @@ static int ipmr_cache_report(struct mr_table *mrt, ret = sock_queue_rcv_skb(mroute_sk, skb); rcu_read_unlock(); if (ret < 0) { - net_warn_ratelimited("mroute: pending queue full, dropping entries\n"); + if (ret == -ENOMEM || ret == -ENOBUFS) + net_warn_ratelimited("mroute: pending queue full, dropping entries\n"); kfree_skb(skb); } -- 2.13.1