From patchwork Wed Aug 2 19:59:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Cardwell X-Patchwork-Id: 796754 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="S3/V97OB"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xN3vH4qYRz9s75 for ; Thu, 3 Aug 2017 06:00:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752384AbdHBUAJ (ORCPT ); Wed, 2 Aug 2017 16:00:09 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:38789 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbdHBUAI (ORCPT ); Wed, 2 Aug 2017 16:00:08 -0400 Received: by mail-qk0-f182.google.com with SMTP id x191so33143670qka.5 for ; Wed, 02 Aug 2017 13:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=an3/okBrv8TdubyvFd9iqOqg5OsTpyo9K1BSZVlDs98=; b=S3/V97OBrJowsFtM/+hfx7NgGARA8jq9nqsE/vz1eec3TEQQ5T0sNS22mAtmWrRTUO bp2C1P/CbshuRXwqdiv1jeOnkUZAopLnrKPk231/K167/Vh2aLy8mE0q78ebR+ASUh+X QpqxrdtCP6ZK7BcNQGYOO7X9YbWxLXKaesFzgcw2At2mlp31lSlcmyvEgxHlLZGFv7JF o7yWgO9OiH/46/IsnldkcGUdeAhFMdAf+VChyXCFcpYScGLo4r8bjOo97HIIebi8ZFbr ClYGhi0XbEigESeDIYO+aYaigOy39rmND/hI4OlRXVSG89vhnJ95B8p6z4K45FslaI+p K6WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=an3/okBrv8TdubyvFd9iqOqg5OsTpyo9K1BSZVlDs98=; b=qBcjpt50Z39WWEbRyYOl8pmeynrkFuBQLo0SKvNLfhaf8Ysy6bXwFKyeU7GMW3Wxt/ 1f5vSijyACnADkhee02vYNY9a1dMcL6BrUpjjVcWrSMgI0OP2c38dUEoaVIjLbyr4i+6 a9Du+J4wabQmwSkdm0iFkjzXDKzEtW2mNhE4nrn6UoMwObu8BEg9wY3ls/DueebiolEA L7UWH4R/HfOF/NWj/PmJzwwQN+VslzlfYVHhqB5DLT+2I+YidLltIiO3aS39GEFYSJRX etZdOHG2l25AKbxlAwaEIxbUj3a6fMCqeK1RM4dNMkd+fho7kUf6FucGYvfNtxjAr70u WTUA== X-Gm-Message-State: AIVw112+9qbyLVWfeiasCMx2Cm0k7J5sqZhJSLKMMbU+ZXJyde2tIem/ 2qhX67E2GAURLWFi X-Received: by 10.55.160.14 with SMTP id j14mr31486846qke.196.1501704006100; Wed, 02 Aug 2017 13:00:06 -0700 (PDT) Received: from joy.nyc.corp.google.com ([100.101.212.71]) by smtp.gmail.com with ESMTPSA id d125sm24514674qkg.43.2017.08.02.13.00.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Aug 2017 13:00:05 -0700 (PDT) From: Neal Cardwell To: David Miller Cc: netdev@vger.kernel.org, Neal Cardwell , Florian Westphal , Eric Dumazet , Yuchung Cheng Subject: [PATCH net-next] tcp: remove extra POLL_OUT added for finished active connect() Date: Wed, 2 Aug 2017 15:59:58 -0400 Message-Id: <20170802195958.21383-1-ncardwell@google.com> X-Mailer: git-send-email 2.14.0.rc1.383.gd1ce394fe2-goog Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit 45f119bf936b ("tcp: remove header prediction") introduced a minor bug: the sk_state_change() and sk_wake_async() notifications for a completed active connection happen twice: once in this new spot inside tcp_finish_connect() and once in the existing code in tcp_rcv_synsent_state_process() immediately after it calls tcp_finish_connect(). This commit remoes the duplicate POLL_OUT notifications. Fixes: 45f119bf936b ("tcp: remove header prediction") Signed-off-by: Neal Cardwell Cc: Florian Westphal Cc: Eric Dumazet Cc: Yuchung Cheng Acked-by: Eric Dumazet --- net/ipv4/tcp_input.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index df670d7ed98d..99cdf4ccabb8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -5342,11 +5342,6 @@ void tcp_finish_connect(struct sock *sk, struct sk_buff *skb) if (sock_flag(sk, SOCK_KEEPOPEN)) inet_csk_reset_keepalive_timer(sk, keepalive_time_when(tp)); - - if (!sock_flag(sk, SOCK_DEAD)) { - sk->sk_state_change(sk); - sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT); - } } static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,