Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp709826ybv; Thu, 13 Feb 2020 08:08:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxGTvmteosZ6nA66tobFj3GEwMWUB51SyTnfMd3eo4LWdiJl0UkAY7Y2k60qbZY3Q+AvEvl X-Received: by 2002:aca:d484:: with SMTP id l126mr3280588oig.114.1581610115646; Thu, 13 Feb 2020 08:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581610115; cv=none; d=google.com; s=arc-20160816; b=L4y5gMWG5NztIdFOtBNAF6wE9KE4El8h0/RUMHHyfSXJia0jKdj10HPs02kMWSpQ0Y mR4ng8+VPB8Vwbn41KkQ72WlBjfWjhVMf0VIslkNH4mtIi1+kmJYaUGuRJaWYN0Wd5wo Vi36M4N4DIJHkwpBwfPmE5TBDUqe6A3ALXMNYycGaHjO/yaEHlvJhHRoGkwaqTbxHohX 3jQX/wY9kX0VOcnrNsBNOGZRHbNY6TzQ+Q9pUzYFQx/TG+pwlbeGx9hBYpCgg5wKQkOC hy2iMsq+CbEHXdSWD0fP09Dx3lvmWDmtPl01Oyf/xtMBHtdSnwxpCznuVoW02DpQirn/ oXzQ== 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=Sf5kJl6ltht7vh7aium/3w4SBTGd0yJtqAvJjY9n6co=; b=cRmFVE7DkZ+pH0zfDSvah3Eo6aKR70Q+RkwybIopLhHwczwTIHmrT+ZywGmcPkv450 +JJUowA0v+NL/fUx+ECoP24YxVvHqKgstK2EVzCV+iqR09/iCSLKun818SGamnQ3gW5k IW9PclAXY2i6+ondAEPV/APXjb7b0NwrMCzo1q1Kj+1DTGWvtHAUyuqLMxwKl2TPZjnT 2Yp0NGWRLL+dl/VF4bzIDvj4U6Mtb5CcWSAkH09GXSglagz5lx7A+ldPDdgHBKC6e8up Yob/um8JfLSkEy4+GOaAhmO1Djg41/kttzMBWHfZP06yN0f6cTambJahX8r7lETBIunt A2sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DNm6cuBE; 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 p186si1402962oih.172.2020.02.13.08.08.21; Thu, 13 Feb 2020 08:08:35 -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=DNm6cuBE; 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 S1730218AbgBMQHo (ORCPT + 99 others); Thu, 13 Feb 2020 11:07:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:34212 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728335AbgBMPXS (ORCPT ); Thu, 13 Feb 2020 10:23:18 -0500 Received: from localhost (unknown [104.132.1.104]) (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 11729246B5; Thu, 13 Feb 2020 15:23:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607398; bh=1FyZM8Sm13hqaDBtOaWeU//3WAyzW/q97liyi4uvJm0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DNm6cuBEfO4Fwl8y+kb7yRMSIR2Mqk49YjcukQlZgoSD4VG6KtZxQLRiJ0iiGpx7Q H+cxLas2ok3uPP3M7pGhboxpn8ZqGXrjy+CchFws44Ob/arnzd7THBaQ9KIqGRuTWv RZC0uGpndj/C+HxFsX04yRnYYq46tETUYLtxDCVA= 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 4.9 012/116] tcp: clear tp->delivered in tcp_disconnect() Date: Thu, 13 Feb 2020 07:19:16 -0800 Message-Id: <20200213151847.537979384@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151842.259660170@linuxfoundation.org> References: <20200213151842.259660170@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 @@ -2298,6 +2298,7 @@ int tcp_disconnect(struct sock *sk, int tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp->snd_cwnd_cnt = 0; tp->window_clamp = 0; + tp->delivered = 0; tcp_set_ca_state(sk, TCP_CA_Open); tp->is_sack_reneg = 0; tcp_clear_retrans(tp);