Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3730514ybv; Mon, 10 Feb 2020 05:27:47 -0800 (PST) X-Google-Smtp-Source: APXvYqw72okfu+qOCIOt/zB+8TiDy0l2xSSsDtEkgUDAbmINz1633Zfz9xSNa6bxxRmAb98tYCO2 X-Received: by 2002:a9d:5885:: with SMTP id x5mr1033867otg.132.1581341266969; Mon, 10 Feb 2020 05:27:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581341266; cv=none; d=google.com; s=arc-20160816; b=q9/QF9I8MP8CbKVLvthS8b6uGD3XRvNGbS1WIdYCGUacXuO7de+L9gSlRSDLBnuzU8 PsdsMLFKaB+J632QYrKn5K4+EDcXSGIBAKWHa1CsBnhaEZ0LjGDPJiqc0aGza8l4WD6C unn1/mO6ZqBfdtO1jW8c9a+zNLy7pCfrLeI8XeFQlsSGpjp4OxzUoL2Ezes/j5ujE5iB cTh3vWhIXpbWMDWWiYIGEZxHbzlhEcz+ZQ8+OyylROvb+1YraML1dKMA4QuxzhDIDQmB EASTPA5jBlneJp1z8AEgNvUovaTjU5EJP4OqT3j3A95+fbpVe/jGy2r5NcAsDUaZjK43 fu2g== 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=6/Q07ENM0uzKcaTJJMR8jVsuKj/LjBqrFYARB4qCfF4=; b=kblPmvZBr23xxlzoD6sG7xJ2P69qhp7ZacJ5CR4F9I70NvXz/mD7Fvf5pcrO6HNVxl 2LLLT1Q1j5bb57VnS8Mt7NCcgYTTVVq/SzeGquJj/1j9ywDgye4DprwrXpWq+Ksk4M8K RzuSUlnqB0GAg9NcPgYyey/z+OSbYclVzrsUmWle+A81BlJ41zf95TDzqxahZwGCqh+G 01aI6ptzN06/2IqVMYgoyc+80wlwq/cfXKrg/so2qFErQbY0YMk4e8J0AZmvSR6asBvj G+2H/mE8nQLXcSBmcVk3ElGYVcGN5D1UVLuwQGMWzyvW/eLqDzlH28yyr/PzZzYykaKQ D28w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lcWq1jnW; 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 j18si175996otq.275.2020.02.10.05.27.34; Mon, 10 Feb 2020 05:27:46 -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=lcWq1jnW; 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 S1731198AbgBJN1E (ORCPT + 99 others); Mon, 10 Feb 2020 08:27:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:56566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727877AbgBJMgk (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 7F61220838; Mon, 10 Feb 2020 12:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338199; bh=5v64RglUFJuc4nM31dOBXF0JdWrVYkV3eh4KqTNworA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lcWq1jnWrtKxn+hH8G2NpKjdiOJZUablKbkIl64PVXmL7VfKI+/U/tCcKuTZYo7G7 JWxG2YiMg+H8oNVwCygcAjKCcviE4bZfgH2Fv11zLEOomhG0wBC/LR4sml4VkVkdrY z1HJh5wCKNpDkdHbN2JUk4H7u0oyPihxMTkh8pto= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , SeongJae Park , Jakub Kicinski Subject: [PATCH 5.4 014/309] tcp: clear tp->total_retrans in tcp_disconnect() Date: Mon, 10 Feb 2020 04:29:30 -0800 Message-Id: <20200210122407.370933714@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 c13c48c00a6bc1febc73902505bdec0967bd7095 ] total_retrans needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Cc: SeongJae Park 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 @@ -2622,6 +2622,7 @@ int tcp_disconnect(struct sock *sk, int tcp_set_ca_state(sk, TCP_CA_Open); tp->is_sack_reneg = 0; tcp_clear_retrans(tp); + tp->total_retrans = 0; inet_csk_delack_init(sk); /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0 * issue in __tcp_select_window()