Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3695844ybv; Mon, 10 Feb 2020 04:53:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyvDJXU7uKa/V6Dukvvv9tQSdFSe70I4deH+7hduIGsL8/G18kzaBc70UVi1KK1aASu/wZo X-Received: by 2002:aca:ddc2:: with SMTP id u185mr744980oig.24.1581339192007; Mon, 10 Feb 2020 04:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339191; cv=none; d=google.com; s=arc-20160816; b=ssFJuS6Cda8ZZPEBIPpUfWoqFpG9ID1GgUyu5zxJkgpjSPriSrk0V4Y8F9RkW7vTLF teYm3BuKLaYgAnIZc+ro/Sf+/JY4ufn3he0QSzjt2GcD1BxU+Jk3HeOQ9Ak6APYPVbbj z8rp8K7Pg8yZ+DrgHR6QIEkrkr5PhnHaL0IKdVaXzTjr6zOBI+PwwVFNvnzNAfBhW0pS BNNGBCCA5qLpe1In5ZEDUYJphrIWqAimIu4liGrpOzumAWA261CLjyKxTbnXgCa0BXq0 SxIj4iZkhHOoDlO/MOu8uubtSIq+teDfYJvVMLGwuvB3Ft2qpGWMaqH3UxoUwFv82HwZ LxWg== 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=JWCTqeQ16aLKnBBemLHmYvyKwt8YrYAJHSIzz93puGk=; b=CmlAW7ELX/fNnQqxv/60huS/gA0o6bP9iRtXoirUy95X8A8vTWDvn0ROawfjlvwxoS VCFIYsx0Zi+nqHAJLI0MagdDlYw0LPathLlcy+2vi3A4O0/fPI7umRc4TlPi7GVH1ATM Yd/nhGBG1fyycwcmd3GtYNgvh3UYbMiic/jPt6dKy17npRr63pYK01RmnKjAHw7WyYxx lBQ0w71teoI1vW8ujvujBMtXhWw+K2al1Qlhu/IFmtqhw9CPGiDoidKWvJgFSTlVXQLq TJIyeHXujRTE/kHlZ4ZFughBP4Qzirim+JQgen6fO44EURzieJNQ5TRlM99qj2zuP82W Mchw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sd90FR3G; 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 t1si146178otq.148.2020.02.10.04.53.00; Mon, 10 Feb 2020 04:53:11 -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=sd90FR3G; 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 S1730240AbgBJMmW (ORCPT + 99 others); Mon, 10 Feb 2020 07:42:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:36682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729380AbgBJMjR (ORCPT ); Mon, 10 Feb 2020 07:39:17 -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 33B3F20838; Mon, 10 Feb 2020 12:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338356; bh=x4sH2IWBexyDxgO/ROUbLedXb7yB3f9pf4Eg6evMyOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sd90FR3G/3YUhtDu/RV9GSdJ5X6cjbgT2cyg03kJsmkOZwZvHYL3WCUn1sD22o/4E 3WaYP0OUpxE0jwVh1aDzTsG0UIY9q5n9RHSPVe4xnuL65AmAi2E10NgNVVJtKjj5Hr kzoOFfniSxXneVGGNcgtl3yeOt7KE4j29+lkFkuQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Martin KaFai Lau , Yuchung Cheng , Neal Cardwell , Jakub Kicinski Subject: [PATCH 5.5 013/367] tcp: clear tp->data_segs{in|out} in tcp_disconnect() Date: Mon, 10 Feb 2020 04:28:46 -0800 Message-Id: <20200210122425.080361178@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@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 db7ffee6f3eb3683cdcaeddecc0a630a14546fe3 ] tp->data_segs_in and tp->data_segs_out need to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: a44d6eacdaf5 ("tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In") Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv4/tcp.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2642,6 +2642,8 @@ int tcp_disconnect(struct sock *sk, int tp->bytes_acked = 0; tp->bytes_received = 0; tp->bytes_retrans = 0; + tp->data_segs_in = 0; + tp->data_segs_out = 0; tp->duplicate_sack[0].start_seq = 0; tp->duplicate_sack[0].end_seq = 0; tp->dsack_dups = 0;