From patchwork Thu Feb 16 15:50:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soheil Hassas Yeganeh X-Patchwork-Id: 728782 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vPLGv3RPLz9s8X for ; Fri, 17 Feb 2017 02:51:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="pyEw6DSj"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932535AbdBPPuv (ORCPT ); Thu, 16 Feb 2017 10:50:51 -0500 Received: from mail-it0-f46.google.com ([209.85.214.46]:37777 "EHLO mail-it0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932437AbdBPPus (ORCPT ); Thu, 16 Feb 2017 10:50:48 -0500 Received: by mail-it0-f46.google.com with SMTP id x75so29232211itb.0 for ; Thu, 16 Feb 2017 07:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nDqN8M8nEt0p/wS6Jw7uDAU/YE+XRS9WX16b2vm0x1k=; b=pyEw6DSjr/T6VsrVASzWGJjVLOEGLwocNTZcSHHfB4DuloXXj6T770c9/oyuCV57Bz IjOsKuwz7a1kW5hmUCcWpW8fkar3dSvWZaO9VzqlXqZNTRwK7N5dnAWQI8RZf1m6vAG8 klelFqB8Ta8i+QSt07wxpXpbaC8OicOoh9U4qynba1LGSKBUZi/XYhCucIAATzOtjEcY dpcoLMvcVnwvsRTJS9jvT1ESzbNIdt6N0xMAnQwPyqbc1svGciBIM7h3AgXBFE8Q+nL8 GlO/f7wiXCTNa+wC+c/2tFRThJu+aoFXUPqQ88iVhAjrdmD60rkUhVGS9ZjTH0pV5VZf MW9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nDqN8M8nEt0p/wS6Jw7uDAU/YE+XRS9WX16b2vm0x1k=; b=ulaV1r70AmNRvPKcgcaJRm31Hk90RJabVcNozNgdrfBgI+9ZN6w0seeKPF0+Blf4aO 6yk3PClze3CykjiWP/czH5Ca0tsnpIVPcK3OcJEef/HA9UFFIwRMcSqTFKTntVcgMOOV q4LwCE+JpBo/dRuxWAeOiB4WaylUeAeJSqWzDi7E9Nf6EyOmc/3dBsFgU8fiduKU5Lnl Xm4oq5oBJR6BeN+FMEVFhfwAEgxAWouyHGbAq8upkkbEkRrHdiGjonIw82oJDwuvsmHh irb5RoDuMet+Ie66t0kCI7c2i+1MhuGfbSJhAum8G22JGkE6AaSS/sSoa3U20pBQY7EA 9q7w== X-Gm-Message-State: AMke39kVvsIPPsFtPvvMdnyOxXTbJym6dfG95i/je3/w9Uoeh3hpcbjjwBDTgd5KsfJRV+JHuQPsXf/uSNBE9CaO X-Received: by 10.36.40.142 with SMTP id h136mr2831019ith.95.1487260247047; Thu, 16 Feb 2017 07:50:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.132.84 with HTTP; Thu, 16 Feb 2017 07:50:06 -0800 (PST) In-Reply-To: <20170216120547.GK582@shells.gnugeneration.com> References: <20170216120547.GK582@shells.gnugeneration.com> From: Soheil Hassas Yeganeh Date: Thu, 16 Feb 2017 10:50:06 -0500 Message-ID: Subject: Re: [BUG] 4.10-rc8 - ping spinning? To: lkml@pengaru.com Cc: netdev , linux-kernel@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Thank you Vito for the report. The patch you cited actually resolves a similar backward compatibility problem for traceroute. I suspect the problem here is that there's a local error queued on the error queue after an ICMP message. ping apparently expect the sk->sk_err to be set for the local errors as well, and hence the error. Ideally, ping should read the error queue if there an EPOLLERR, because local errors never sk->sk_err on their own. That is, if we have But as a workaround, would you mind trying the following patch to see if it resolves the issue reported? From: Soheil Hassas Yeganeh Date: Thu, 16 Feb 2017 10:48:24 -0500 --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 734c71468b01..2b774b564024 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3717,7 +3717,8 @@ EXPORT_SYMBOL(sock_queue_err_skb); static bool is_icmp_err_skb(const struct sk_buff *skb) { return skb && (SKB_EXT_ERR(skb)->ee.ee_origin == SO_EE_ORIGIN_ICMP || - SKB_EXT_ERR(skb)->ee.ee_origin == SO_EE_ORIGIN_ICMP6); + SKB_EXT_ERR(skb)->ee.ee_origin == SO_EE_ORIGIN_ICMP6 || + SKB_EXT_ERR(skb)->ee.ee_origin == SO_EE_ORIGIN_LOCAL); } struct sk_buff *sock_dequeue_err_skb(struct sock *sk)