Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2458800imd; Fri, 2 Nov 2018 11:45:46 -0700 (PDT) X-Google-Smtp-Source: AJdET5du5F0SrSsMbyF3LDESE/KP/cIoyqQf1mJdVUHjKaSXU2C2ucOJOjeyhhzmnh4lej+iEGh8 X-Received: by 2002:a17:902:848f:: with SMTP id c15-v6mr12358373plo.119.1541184346652; Fri, 02 Nov 2018 11:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184346; cv=none; d=google.com; s=arc-20160816; b=o1ARN+s9srH+oA/KnVkpS0yXGkXDiiqOu3gRxXuwFry27g1GOYh2zPQ5vbigmegyop pUyRP1BKXx9KOlNB0sroMYuwuNiXAPIy0D8JJKXchvaLbliG4FBnS51ZmJtHootRStfJ NwB1OF1mdcSq/asm5N003U/Z+rVvG+r4/opR9LuhxVs8KEpzw7dYrdDCNZoKPxpEO6oP kWs99OUap3IvaulEL/rrglMMOy69pQ0e3ap4uaISgI8HLKaor9HA6sFpFwH9KYFeCxMO yy76jp/2PgLSf+9e1z0UacCF+qNUQZ6QkVSuSvAiM5H26MA6hIzwb94ivj9f+fnedjRj M83w== 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=2q0C4LnJuLunVXfGZMmLHBSh675tTvt7RHp0o/xwKLY=; b=m/QUhimkqou1QO/jmpE8Wz+vRmJP5TCXhaCthGiTyl2azC+JVR8UxykAt012Q3bokH bG/qjRfvdAb7XNdiJcyROjj2MQ1SK4ryb3Bjbipqo+N5gEXItGqcFIfxZ7HPGC9Oezob /dewmcDBBpW15RyUlVpbzKZ/VFaYA5ZADz/PPth3FpzFzZnThGXtr9jC7/tj4Sv/8VVY mb+sq1EM9nJl+QJrK/ddXxf+ZgRC5abnqycigeQAiP46XBUgb4hyukvVdLJ81LM05sK+ Tg5iBlEj0oMCTbr0UTpbl/43Bdoro69yKcMysPsVc6oMv6CnZn95IhfCholi7kC43CZL +spA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BEcRCB0W; 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 w5-v6si37720259pgm.174.2018.11.02.11.45.31; Fri, 02 Nov 2018 11:45:46 -0700 (PDT) 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=BEcRCB0W; 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 S1729772AbeKCDwi (ORCPT + 99 others); Fri, 2 Nov 2018 23:52:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:47926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726849AbeKCDwh (ORCPT ); Fri, 2 Nov 2018 23:52:37 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.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 7AD0720847; Fri, 2 Nov 2018 18:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541184264; bh=Cvlr4uLMsiI9VlYyBHOmFFUiMo8c4ja3YCOZ/RYwGno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEcRCB0WvrlojYVBadBVYUBcOkDnrISJ2zMrElk7DmOnEKaJ9YSrPNIRTU3YH5zBQ KjPVFfc9X7HbCyDNrNx+cv8dQLZ1lTS+Guat62iZPvztRH6sfp//5sdRGc3F8bnhKG jBMsz6d9yu3eaiT5rj45iWKwO3tgxpqIgzlojc9s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , Sasha Levin Subject: [PATCH 4.18 085/150] rxrpc: Only take the rwind and mtu values from latest ACK Date: Fri, 2 Nov 2018 19:34:07 +0100 Message-Id: <20181102182909.432560106@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 298bc15b2079c324e82d0a6fda39c3d762af7282 ] Move the out-of-order and duplicate ACK packet check to before the call to rxrpc_input_ackinfo() so that the receive window size and MTU size are only checked in the latest ACK packet and don't regress. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells Signed-off-by: Sasha Levin --- net/rxrpc/input.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) --- a/net/rxrpc/input.c +++ b/net/rxrpc/input.c @@ -862,6 +862,16 @@ static void rxrpc_input_ack(struct rxrpc rxrpc_propose_ack_respond_to_ack); } + /* Discard any out-of-order or duplicate ACKs. */ + if (before_eq(sp->hdr.serial, call->acks_latest)) { + _debug("discard ACK %d <= %d", + sp->hdr.serial, call->acks_latest); + return; + } + call->acks_latest_ts = skb->tstamp; + call->acks_latest = sp->hdr.serial; + + /* Parse rwind and mtu sizes if provided. */ ioffset = offset + nr_acks + 3; if (skb->len >= ioffset + sizeof(buf.info)) { if (skb_copy_bits(skb, ioffset, &buf.info, sizeof(buf.info)) < 0) @@ -883,15 +893,6 @@ static void rxrpc_input_ack(struct rxrpc return; } - /* Discard any out-of-order or duplicate ACKs. */ - if (before_eq(sp->hdr.serial, call->acks_latest)) { - _debug("discard ACK %d <= %d", - sp->hdr.serial, call->acks_latest); - return; - } - call->acks_latest_ts = skb->tstamp; - call->acks_latest = sp->hdr.serial; - if (before(hard_ack, call->tx_hard_ack) || after(hard_ack, call->tx_top)) return rxrpc_proto_abort("AKW", call, 0);