From patchwork Tue Mar 9 15:55:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 47166 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 0A97EB7D13 for ; Wed, 10 Mar 2010 02:56:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751630Ab0CIP4H (ORCPT ); Tue, 9 Mar 2010 10:56:07 -0500 Received: from mail-bw0-f209.google.com ([209.85.218.209]:51519 "EHLO mail-bw0-f209.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753Ab0CIP4F (ORCPT ); Tue, 9 Mar 2010 10:56:05 -0500 Received: by bwz1 with SMTP id 1so4022823bwz.21 for ; Tue, 09 Mar 2010 07:56:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=9VBbac0Xdgs6uWLQz+Qr8fQDWRiP0Pz3+nQ+6DTjSgY=; b=wBeHvNllLvgLY4QKOmgR3UOCtUuNflc8nHGdifNvRfRyjQQUfkJPPN7LYvUyJPGaFw Zyivbpq/2S4wSMRKG/5qe3oMq9CIPBkm363j+5yJ3TSjtPd4X+GEfM2Y6kQ7W2CMMZ1l 3KZVmLeUCikgyBGiDMETHcZEIleD1lkVPPlkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=hddSZlWJFKbsRvNWyaxKA9qEufvK6vAjD5npbigaEZrxt1KyLJ6A+lTa1asp8zDdYf YLGZzeiFHBAx9GEN71DyWQbF8HsgySJzu1wZ4Iy5pS8NAyPK6oTzh4ETXeVqrcKc2eRu ebwTlmrEK1gL1oOnBpOv4fYP9eICv02OnpsH8= Received: by 10.204.131.210 with SMTP id y18mr1780782bks.100.1268150161247; Tue, 09 Mar 2010 07:56:01 -0800 (PST) Received: from [127.0.0.1] (gw1.cosmosbay.com [212.99.114.194]) by mx.google.com with ESMTPS id 13sm2257822bwz.3.2010.03.09.07.55.59 (version=SSLv3 cipher=RC4-MD5); Tue, 09 Mar 2010 07:55:59 -0800 (PST) Subject: Re: [2.6.34-rc1] CPU stalls when closing TCP sockets. From: Eric Dumazet To: Tetsuo Handa , David Miller Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com, Stephen Hemminger In-Reply-To: <201003090654.o296sCnh065487@www262.sakura.ne.jp> References: <201003090319.o293J6WF026448@www262.sakura.ne.jp> <1268116647.2819.64.camel@edumazet-laptop> <201003090654.o296sCnh065487@www262.sakura.ne.jp> Date: Tue, 09 Mar 2010 16:55:56 +0100 Message-ID: <1268150156.3113.12.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le mardi 09 mars 2010 à 15:54 +0900, Tetsuo Handa a écrit : > Eric Dumazet wrote: > > Nothing comes to my mind, I'll try to reproduce this here. > > When stopped at (8), Ctrl-C doesn't work. > > > Is 2.6.33 OK ? > > Yes. 2.6.33 and earlier are OK. OK thanks ! I believe commit d218d11133d888f9745802146a50255a4781d37a (tcp: Generalized TTL Security Mechanism) might be the bug origin. I am testing following patch, based on latest net-2.6 tree (including the LINUX_MIB_TCPMINTTLDROP bit) [PATCH] tcp: Fix tcp_v4_rcv() Commit d218d111 (tcp: Generalized TTL Security Mechanism) added a bug for TIMEWAIT sockets. We should not test min_ttl for TW sockets. Reported-by: Tetsuo Handa Signed-off-by: Eric Dumazet Acked-by: Stephen Hemminger --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 8d51d39..70df409 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1651,15 +1651,15 @@ int tcp_v4_rcv(struct sk_buff *skb) if (!sk) goto no_tcp_socket; +process: + if (sk->sk_state == TCP_TIME_WAIT) + goto do_time_wait; + if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) { NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP); goto discard_and_relse; } -process: - if (sk->sk_state == TCP_TIME_WAIT) - goto do_time_wait; - if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb)) goto discard_and_relse; nf_reset(skb);