Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3731314ybv; Mon, 10 Feb 2020 05:28:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwD23N4u5sL6Ud7TwyvQEH5p1O62r8O57sj17nJJKglpJ5+MCpsyVxrCHMBDRrY5knz6Hph X-Received: by 2002:a9d:7083:: with SMTP id l3mr990068otj.193.1581341319725; Mon, 10 Feb 2020 05:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581341319; cv=none; d=google.com; s=arc-20160816; b=XUn54riIc2Ta/bvknvKBNRMCE4wqdnpf+WtUStcKccjAnwf0ker2qgDvvNych6BG82 D+ywJon6JLHN48W6ddr+NagPv10ll1SRAg+L/Ds2j7o2aREMXV2YtkFksxHvjqJzEaqf V9PjX+NW0joc2M5fT5rjcub3B73YOdPsroQCnYDmI4JH2ED3rICwm0hoJMcnGghV8Szt 8Q9D2r/lU4F6nNFgO9BsQ3meHW70tbj0K6/oEcDX8d7/LGchPWV6sCjH0eQb5JeQiB/O DENA9svNMDH55vFVtJk+3U3rYV4+ZaP75GOVzawBbh85mVmsA/o7CqZ5HLl/J0sZama0 0+Fw== 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=uzkVqHXsoI2aubK9gYqzYF6lA/c9i4eHb6QbcApcnmM=; b=YxsKEpTkvsTIcoXTTGDrpurPDTw1SHp2fw2WcfJHXXsjg/S1DkUxsw655GSewQeUrx zCaEQTnxIIoAZhu1JOoHwGfz1akGjNOJiZR3nm4QMuKSGMoQapotNl68dFckpO7KOZ+i ciY81oZP+fig78u34LwWQg+0imXElMSvm5++N//XpwtLsGTsvHts0eBoG7aul2jP8rHo kO96xF2Qxv2PaeNbr98CxdAdYWfvgmAb/4GRCHevqA4UMYRfewL4alWn4/jnwvAK6sob f9ucQp8GfhqTpqpSiJJ3p6fyBIq1EAskw4aQt98SbxIKXfl4xjyRWzJKln947O3qcwmi pJiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U+1NmE3m; 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 n203si138751oia.112.2020.02.10.05.28.27; Mon, 10 Feb 2020 05:28:39 -0800 (PST) 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=U+1NmE3m; 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 S1731273AbgBJN07 (ORCPT + 99 others); Mon, 10 Feb 2020 08:26:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:56590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728466AbgBJMgk (ORCPT ); Mon, 10 Feb 2020 07:36:40 -0500 Received: from localhost (unknown [209.37.97.194]) (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 074DF20873; Mon, 10 Feb 2020 12:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338200; bh=N5y7pKX80UIjRezLrQE5/bhaJl9jZEsKZ2aCw4TLKh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U+1NmE3m6lVwrSJJ3PcIj7LghaXJcFmdyOQxe7NAJ1mQZO1rHLoOH6CwGQAcD9Dij u4At9YdCKAgt3wmBddtLQP8EnVVqe/5A7V24CujrZDTUkxs5wnVFGPWoMMHeeHRtm0 EoWqvHxNdeIS2QDkd/j3iBSHqe3bymBlH5U6uYPI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Yuchung Cheng , Neal Cardwell , Soheil Hassas Yeganeh , Jakub Kicinski Subject: [PATCH 5.4 015/309] tcp: clear tp->delivered in tcp_disconnect() Date: Mon, 10 Feb 2020 04:29:31 -0800 Message-Id: <20200210122407.475689871@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122406.106356946@linuxfoundation.org> References: <20200210122406.106356946@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Eric Dumazet [ Upstream commit 2fbdd56251b5c62f96589f39eded277260de7267 ] tp->delivered needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: ddf1af6fa00e ("tcp: new delivery accounting") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv4/tcp.c | 1 + 1 file changed, 1 insertion(+) --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2618,6 +2618,7 @@ int tcp_disconnect(struct sock *sk, int tp->snd_cwnd = TCP_INIT_CWND; tp->snd_cwnd_cnt = 0; tp->window_clamp = 0; + tp->delivered = 0; tp->delivered_ce = 0; tcp_set_ca_state(sk, TCP_CA_Open); tp->is_sack_reneg = 0;