Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp899341rdb; Fri, 2 Feb 2024 07:22:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH16weboZn8to73UYZB/Oi7b0+cHJFNkzCdE9aPMAa6XbpYwFTlFUMmbetN2hc0QzX9pV2 X-Received: by 2002:a17:902:e5c1:b0:1d9:83c0:a163 with SMTP id u1-20020a170902e5c100b001d983c0a163mr541435plf.7.1706887371231; Fri, 02 Feb 2024 07:22:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706887371; cv=pass; d=google.com; s=arc-20160816; b=NbYiEdO0qCFU1jsiAcEUAzqzCDJM6zlG9MozU9M9ig3BPMiDIE9uwiH5Hu4PxxCAgH +0jviR3HDeavUCtN2Jz/8uUrhG8iW+GBYbrE6p27VNd2MUAXMdQMegYiasz11i8+/xrs EcScvI1H3j9TLPV06Cu2sBaJ5H4EF25XynzU1fXH8AvD+A7fbIUDnK93TbA8RwHTQrnI wWkIOkEUnVXGlW4T37Nwof6Dxx10puLgsskTl7CwiTfxtsUgX1GeMe6c3FxiLTHv7C1A YXnpDmCfdVc2yCZW5LsAvxvxbxqz92wU+eEmtCnVaYmvRjrfERraBjRH5C76eJ4LvuPm 3STg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=N1WveAHZlbT2Jr8SpAue0DFDakkoJsIm8keFO2yBAaw=; fh=zz7uzDNtlb0BN1ujw/K+UnrsA0rPKSQ1yIG8vdyj96Y=; b=W0CDQ8Yj9Ob6xC9oTxidnw9KxJu8SkbFm/huZFFfuhe1hN/wL+CfveIvfbml263mVg /jp3GD4ohRWtCbJCv58i/NLSZqM3dmfuOuDr7MqNNY2IhBgaI/v8s4CWY69I61F65M9t 2rI3EH53dd0wSUhlMRmOsAThz3Vtt4eLwuA8GvbJkCLd48VWaDIJXsCN2WorZ/wjBaOK 2r94jG/g7NiPfXK61gHBXdU4gH9ny5bvTbq0m6h1jHWi4651oZFFT4fvJ73woUTTu4NP GR5ypmdNrqJbzJepb6613pn2l7C8SyhquyuBXyOIDAgJnNO8I5934nn7AfyZcmmPGzhJ +V3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PGAeD4Qs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50013-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCWffr4GBR9Fhnc9IRJjbjY7Q5klEtY2w5bKWBbHRiBTn63OucMqC/Dmu4TiAws+1ha7OYRcJ39vOK1g/V8CisZegOqgGLaNSVnqWG4d9g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b2-20020a170903228200b001d5ee591d8esi1894556plh.344.2024.02.02.07.22.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:22:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50013-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PGAeD4Qs; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-50013-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C5C9C282D0A for ; Fri, 2 Feb 2024 15:21:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C62011474DB; Fri, 2 Feb 2024 15:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PGAeD4Qs" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6523A1474AC for ; Fri, 2 Feb 2024 15:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706887214; cv=none; b=Ld48WMafvrHzxDSRwIBclrbboKlMWIoOVMJWgH7EiFL6hWiRLjwj+s8IeQRuuF6mmlaeLOy3PLU51fjvIUNoBv6OLUrvwxd4xWl6cWzsfXCMacOulKSjh71HDk1YRBO8YHBAj7AOrOFZlVeVNRBj0jxSr3QhWonfSZGYDUwdoKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706887214; c=relaxed/simple; bh=r7Nry9oL9TkD4iL++0wjmJRlASXSaQRwNQreDpD18DI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l4QMbt28nfAQahGG3V5nWjZJIXVyWeXc2T6jvhlltB6r6qMHtwldSOOgnsIz6j2JjE7WQXZN5JuUAXXuZOLKBCTD2QJV/Ce0zL8318+kI9ZQ+MxfVSLFVdmZz++Dn+sHKOS8g7xFYsl/6DuXQ42J6RJ4IfnC15I1beUv/Fj/Zbo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PGAeD4Qs; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706887211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=N1WveAHZlbT2Jr8SpAue0DFDakkoJsIm8keFO2yBAaw=; b=PGAeD4QsLIr0OnDsCa8XHTOOCEaXKjDadP1W+VdJf3EkClH0fY7tqoXPYjrgUL1FBpvzqh YvTHuk7IZQcv8nw6s+7JkCg4fCKMJgCjpHg3cgH7pvIyAPRmGqKMUSm4V8Ypg09XCIDnvj sOFTcMzPbg/RJtrmXQzr7YnK3wvpps8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-18-S6Cdw6QnOlixQ6GwBf46pA-1; Fri, 02 Feb 2024 10:20:06 -0500 X-MC-Unique: S6Cdw6QnOlixQ6GwBf46pA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70F3483FC23; Fri, 2 Feb 2024 15:20:05 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id ECEA9492BE2; Fri, 2 Feb 2024 15:20:03 +0000 (UTC) From: David Howells To: netdev@vger.kernel.org Cc: David Howells , Marc Dionne , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 3/4] rxrpc: Fix response to PING RESPONSE ACKs to a dead call Date: Fri, 2 Feb 2024 15:19:15 +0000 Message-ID: <20240202151920.2760446-4-dhowells@redhat.com> In-Reply-To: <20240202151920.2760446-1-dhowells@redhat.com> References: <20240202151920.2760446-1-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Stop rxrpc from sending a DUP ACK in response to a PING RESPONSE ACK on a dead call. We may have initiated the ping but the call may have beaten the response to completion. Fixes: 18bfeba50dfd ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org --- net/rxrpc/conn_event.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c index ec5eae60ab0c..1f251d758cb9 100644 --- a/net/rxrpc/conn_event.c +++ b/net/rxrpc/conn_event.c @@ -95,6 +95,14 @@ void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn, _enter("%d", conn->debug_id); + if (sp && sp->hdr.type == RXRPC_PACKET_TYPE_ACK) { + if (skb_copy_bits(skb, sizeof(struct rxrpc_wire_header), + &pkt.ack, sizeof(pkt.ack)) < 0) + return; + if (pkt.ack.reason == RXRPC_ACK_PING_RESPONSE) + return; + } + chan = &conn->channels[channel]; /* If the last call got moved on whilst we were waiting to run, just