Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2263444ybl; Thu, 19 Dec 2019 10:38:36 -0800 (PST) X-Google-Smtp-Source: APXvYqzqpw1L+VKBl9SLM5VTHvfURijMVcuFL3U5UrSMedBLlsQgf+/3117CHc/jGdVQBj/un45j X-Received: by 2002:a05:6830:4a7:: with SMTP id l7mr7988674otd.372.1576780716723; Thu, 19 Dec 2019 10:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576780716; cv=none; d=google.com; s=arc-20160816; b=L/rx4WswnuFkoCeIRVUyiot0PweFM5HrC3KXMwBOoEaEBzj0uM3s4NezjUjM+otf5E lEENgUo8sDUJSYjSW1zx1g3gKMOWv1O8QRz59gdXjC+O6GWPLhY6ri3ny5CYOBOhKz9A q4BeXe9/AQopqFT9l7n/rfI74+/wK4INbu34d+MOmQRzpPLc/OgXC0T4QMPnY/ECt5as xvGH4kBfj1kdIvx6S7Hvg24RUy806h5NOjrp1k+11oTXxaG3kMe34h3gOSX307dr1Lo5 4+Q5FIHrvAZbVg5+XlM7ubV01HIsqGXhHEkgMBO+jb6OW0bkjebibwPgZvzNPvF9IStV fgbA== 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=KpTf7GuMP1f/2kIBTIA1sXpUDn13sgKPAsftecUK33Q=; b=ejc48ME4t3WUkfVIAf53sA88UGlukSaglHjRGQKVXMHu6rz1q0ft9Wn8TAhb5AGO2G 6c4VV6qgP/c+LfxUo1dRPqhGWPo8U4n7Y0AQJL394wfCi7kT/6VFAhleBCURA5M+cpfK 6QIgl2jbQLDOv4bCna30CXIK7nzpA91ksA/ggC7uUgaZmya5tJWAVsKuDvCrNNjArKAC udolg5g+Pe3l3X+RX2cdVn2ZR62qOK/2+c+Jpay83SQo1lxd3UdkN6x6X9XqIL9+oRRK 3d0p+UIlHnbY2BXLOCGYkFdg02M11YYInwKz014MoNlW8W5fCmCR5ZKTyueR/8wjKff9 V3uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l7+R8EZu; 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 f22si1302258otp.178.2019.12.19.10.38.24; Thu, 19 Dec 2019 10:38:36 -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=l7+R8EZu; 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 S1727686AbfLSSgr (ORCPT + 99 others); Thu, 19 Dec 2019 13:36:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:53936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727040AbfLSSgq (ORCPT ); Thu, 19 Dec 2019 13:36:46 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 8C35624685; Thu, 19 Dec 2019 18:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576780606; bh=9P/PmFr8QwkkPCwyg8tLxg+CnZ8404FjjoYCGQo8n+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7+R8EZuyRnt//JTKL37Vlx5K/FrtcEDgdM6uD1ZELeNeh5xRFz/WxSAec33I2DTX tauxyVPL6Y5Rl2BLGmI6yjFZujQv+81fM+SuphvhpRekGMrnvJ4RyMspd3mtfCfd8R VZVUMxQAIzNBSl3RSKGxb2J1q8UIM1YNl+JkwIg0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yuchung Cheng , Eric Dumazet , Neal Cardwell , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 043/162] tcp: fix off-by-one bug on aborting window-probing socket Date: Thu, 19 Dec 2019 19:32:31 +0100 Message-Id: <20191219183210.543197518@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183150.477687052@linuxfoundation.org> References: <20191219183150.477687052@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: Yuchung Cheng [ Upstream commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 ] Previously there is an off-by-one bug on determining when to abort a stalled window-probing socket. This patch fixes that so it is consistent with tcp_write_timeout(). Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv4/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 61359944acc71..710cde1a5a832 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -336,7 +336,7 @@ static void tcp_probe_timer(struct sock *sk) return; } - if (icsk->icsk_probes_out > max_probes) { + if (icsk->icsk_probes_out >= max_probes) { abort: tcp_write_err(sk); } else { /* Only send another probe if we didn't close things up. */ -- 2.20.1