Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp703623ybv; Thu, 13 Feb 2020 08:03:30 -0800 (PST) X-Google-Smtp-Source: APXvYqz/fXWZUhvimb5lKvx71Nibeq285AmtjgTsKm/na00RtkPsQKFNk1q+cN8NJs+GZhR+ufFn X-Received: by 2002:a05:6830:4a4:: with SMTP id l4mr14024493otd.91.1581609810349; Thu, 13 Feb 2020 08:03:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581609810; cv=none; d=google.com; s=arc-20160816; b=x2CcU/6gtiAHAXncjQ8eDW4QDFb90i7qTmusqItX//o5G4EE62cijAmyd1Cr4do0aw ChdwkuwsQGM7uAEw9kfyjIg6tdO3rW7CXEmcE4Pv0BlogD8pGCrJaaVBVBRtcvJBdZRX H/JpgSwWvCnfCmkkefnDIteeFrHongVeQojVa0CRChQ37vz0JbtmXG74dHEHuC1q/+3T JXWBqTIfXJeNziu9t2axx1zy51KEJl3r3VWkbvts6XTadgKRTjJIPrsLZQ5mOqkKOgVT kYjAnXt5wvMztUsXGlkF18a3iXq23hLqGKmKWQuipC3BzXLLbiF+93YxU31gnTY4B+wV GN4Q== 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=KOulU+C5n1yB0qOwzn9YEbscHi/fXeaMgMnOlcmXhUg=; b=j0PBYnjXdCKK2C6OUhSEKYmxtaNAK7Oz1WwuqGY6btr3OcIlnTVjA4DoXLQ5Dad6RV S/xCFPuceiK9bh1VVmE3DPuzTsO1guCD9BeJeeeM85aOzLB/9tdrL3Z6UbVNrpQxDnkm PPgjwD/m1qYgxJroBHBA8FDxa9PsFmFJoNUqys2kwWffQfUJDbW5rXX/fuTptMzAD8Kn 5sl4jT2+UjujwoRoVNoS9o0dUkeeUbpE6GGcMEYXTTzstmq+Hb3/Re3BR9OVp78Wo7oR x/pD5XQEllptkjLrUU7UTkrxUlOi1H/A5aByHIqLQzyZJhPQs9iQGIUQEeRIamkUnWAm epfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=M4h8KuSw; 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 v3si1336977otn.140.2020.02.13.08.03.13; Thu, 13 Feb 2020 08:03:30 -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=M4h8KuSw; 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 S1730243AbgBMQBb (ORCPT + 99 others); Thu, 13 Feb 2020 11:01:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:38654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728749AbgBMPYi (ORCPT ); Thu, 13 Feb 2020 10:24:38 -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 138DC246B1; Thu, 13 Feb 2020 15:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607478; bh=tga7NcbudVcpcxnrsaONYFkd+oP+VCUSuXjgIcxZPnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M4h8KuSwX1R0Zm0KZNeg6w6PaZThKpstpjzxLeAMGBZiVYLEwrSel8veR7ApeshWi kOGygRNhgKrh4NuUbtqGfLlxqOTMbv93ESfZnsFTNjjswAuqqCDKm9H4Q+LrDSgPmg DhRa0rtk+fApOasa31Ice9N7AeloBC5jYnl4bCjQ= 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 4.14 012/173] tcp: clear tp->total_retrans in tcp_disconnect() Date: Thu, 13 Feb 2020 07:18:35 -0800 Message-Id: <20200213151935.700219930@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151931.677980430@linuxfoundation.org> References: <20200213151931.677980430@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 @@ -2366,6 +2366,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()