Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17962491ybl; Thu, 2 Jan 2020 15:43:58 -0800 (PST) X-Google-Smtp-Source: APXvYqynVzWp8P+xoM98mcGz+FnnBojhGW5vmred+E5PpX3qihwnem5EY8EjnFR2oG6NoqKJjmg2 X-Received: by 2002:a05:6830:4ca:: with SMTP id s10mr55890368otd.268.1578008638875; Thu, 02 Jan 2020 15:43:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578008638; cv=none; d=google.com; s=arc-20160816; b=w+Dxp0jlso9S0pv5Q7fDY/7fOxFiZ0vrMv6ujxWnjQaHPpDHf2B86UmqUBVvy5Gy0u zvxFIia0MLTo+8cHo5kcyH/s2kk/NT23/HGHDRD7lRDrYWTHZXB2MCSpHEL9d9na/K5l Ipkk8ziRRwWCKLIC6SSjcK/BkZNpzihOr5+kwJZIprzrPDXDJxXVvKW7bWlouwEjjJ14 XwYhqctyac2fZRBf/WtfkxoqU99rJqRCMng8btUcFQG5QzSDIXU5+PbyEKsne+PA+XhJ WNlR9Tu0oiJalf5MKUqiQnIC+z/geb+pH5Uen56tcXa0b8mLV0lqdGE3677JQ+tsC+lo 9nxg== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=4tvvQoj8cyN8e/Tiiixrc/fMBe8akqQVPhIddCdhnGg=; b=ozqKUWuGQlkLxRY3VddmG6PElR63/+CEgE35gzAjAze9xbo2G2Rliargv/CMEZKKq2 O9Sp15yodzlOyOPjF2kIYnJw0OtBqqb3bikTRwRt90I8GXDQF841obL2Z6bNqJYNBZ3X U/+UiX6966VmG6pdaDDJ2pZr16au5Onrlua257iLQ7FYSTM3k+cG0oFl/5k6xDb1MDEn kat3D/IIcfw8E1XErsCOhhR7QCB2J0+3T7N5s3Sz7dshKH0f33I8398g1vD8GEiMrE7k jyLeG8XlpYX/LMKRdaYudWOf5yLodEAdB7FMvuuWJz7XQiKLBbewIVx30aUS0cDxOaL7 Cphw== ARC-Authentication-Results: i=1; mx.google.com; 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 u16si27929103otq.92.2020.01.02.15.43.47; Thu, 02 Jan 2020 15:43:58 -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; 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 S1727323AbgABXnH (ORCPT + 99 others); Thu, 2 Jan 2020 18:43:07 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:52460 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727166AbgABXnH (ORCPT ); Thu, 2 Jan 2020 18:43:07 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:1c3::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 5555B15707A92; Thu, 2 Jan 2020 15:43:06 -0800 (PST) Date: Thu, 02 Jan 2020 15:43:05 -0800 (PST) Message-Id: <20200102.154305.639050830505824860.davem@davemloft.net> To: yangpc@wangsu.com Cc: edumazet@google.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tcp: fix "old stuff" D-SACK causing SACK to be treated as D-SACK From: David Miller In-Reply-To: <1577699681-14748-1-git-send-email-yangpc@wangsu.com> References: <1577699681-14748-1-git-send-email-yangpc@wangsu.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 02 Jan 2020 15:43:06 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pengcheng Yang Date: Mon, 30 Dec 2019 17:54:41 +0800 > When we receive a D-SACK, where the sequence number satisfies: > undo_marker <= start_seq < end_seq <= prior_snd_una > we consider this is a valid D-SACK and tcp_is_sackblock_valid() > returns true, then this D-SACK is discarded as "old stuff", > but the variable first_sack_index is not marked as negative > in tcp_sacktag_write_queue(). > > If this D-SACK also carries a SACK that needs to be processed > (for example, the previous SACK segment was lost), this SACK > will be treated as a D-SACK in the following processing of > tcp_sacktag_write_queue(), which will eventually lead to > incorrect updates of undo_retrans and reordering. > > Fixes: fd6dad616d4f ("[TCP]: Earlier SACK block verification & simplify access to them") > Signed-off-by: Pengcheng Yang Applied and queued up for -stable, thank you.