Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195507iof; Tue, 7 Jun 2022 22:51:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKHcm0SwyLX71hzr4rMfzRrnivXGyyvmiVrw0tVF2cun/K/E0GGYJAudwLOcXzppz9rFQY X-Received: by 2002:a17:902:bb90:b0:156:2c05:b34f with SMTP id m16-20020a170902bb9000b001562c05b34fmr33048467pls.53.1654667514145; Tue, 07 Jun 2022 22:51:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667514; cv=none; d=google.com; s=arc-20160816; b=HMqRImsDBRNr7Vpr6Z5tGNla05euyxHQYmJ6JFFoPASG7aUqWuiO3iVsyL7GoZ5In+ ZI5DuEQ2ylsGI8Tp4njQjtkLBHvOqtt6PD+Pr9KXEO5FdG7LY1ScyLi6QpOTmZOWu1vs Q6LCeI4kGvhlI6zagg7xfrFZIVGpYVS37ZM4LnoVIDjsPkeb4uXVbKLtj4Zzmk7hr4Ig tJL0a6g7Uz9qQsFiAmEe3r10eChToLORqciS34Cz3lhVQ72zX3L92CPoK3QV8Ad7jA9E RhWa4Ie2FvyyFrIYxVSqnxKFLoXqcp2t1w6E+7rU0+gsvnkMeqUZO+GNZztwnm6gqv39 C1PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1yPZcW57QpZPLMzzkh5Kci4DiebnlOFIkWxCafABc8k=; b=ijlzTWgoRsFxemwRm+E5dyQF2zCQzDjQupdDzHBvRfqqA77HtfVUUow+sobfRRnJau Iq4DHg0rhTSOECoqoC0xUq8qimMLImS8ymtzAS/LUU8fvk9LJJPI5qUa4kobY1mGOa6s SOtcNXAR2aR6SFPQbZKhsCklzHf7aRGHfVLfjxoBpV47EFCjt0M+UEunLYyXjlLjY/84 mB8N0+qX3a9DLJCVlJyJ+h/P6KJC5Ub3TjAgKIghQkRG73LUb1ciKLkebwSQf9kzNoG5 7r92XY4Sx3VNeGhEoquJwr7stidzm+Cyh89J/D73U8vHpfDi3tvEXTS6lyWC6xP3yGBm Rm2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pn9sOZ5d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u7-20020a17090282c700b0015ecc946750si25248847plz.409.2022.06.07.22.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:51:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pn9sOZ5d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 583324879E1; Tue, 7 Jun 2022 22:18:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1388075AbiFHAup (ORCPT + 99 others); Tue, 7 Jun 2022 20:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382705AbiFGVvo (ORCPT ); Tue, 7 Jun 2022 17:51:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C9E150B49; Tue, 7 Jun 2022 12:09:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F047E618D6; Tue, 7 Jun 2022 19:09:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0572AC385A2; Tue, 7 Jun 2022 19:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628956; bh=d5f3waSstqFwsHwR92Wq26SEDDhS6+RyUHdRiynwipA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pn9sOZ5d14S2TUvY/BB0kMl5qcJv0okZDQ8s2imRAVsuYQobKp2htripz0iN1olJT 4SJV+Hof6M5xYXTNVMaP7Wd9mZ74LggU7mRM+P12vh3NMJaIf1se04oflyejc4UQCq T6P2k0mrdC1uv1VsT7TnlIxuhG38Cqm7qWLuDGiA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Howells , linux-afs@lists.infradead.org, "David S. Miller" , Sasha Levin Subject: [PATCH 5.18 518/879] rxrpc: Dont try to resend the request if were receiving the reply Date: Tue, 7 Jun 2022 19:00:36 +0200 Message-Id: <20220607165017.911288090@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Howells [ Upstream commit 114af61f88fbe34d641b13922d098ffec4c1be1b ] rxrpc has a timer to trigger resending of unacked data packets in a call. This is not cancelled when a client call switches to the receive phase on the basis that most calls don't last long enough for it to ever expire. However, if it *does* expire after we've started to receive the reply, we shouldn't then go into trying to retransmit or pinging the server to find out if an ack got lost. Fix this by skipping the resend code if we're into receiving the reply to a client call. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/rxrpc/call_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index e426f6831aab..f8ecad2b730e 100644 --- a/net/rxrpc/call_event.c +++ b/net/rxrpc/call_event.c @@ -406,7 +406,8 @@ void rxrpc_process_call(struct work_struct *work) goto recheck_state; } - if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events)) { + if (test_and_clear_bit(RXRPC_CALL_EV_RESEND, &call->events) && + call->state != RXRPC_CALL_CLIENT_RECV_REPLY) { rxrpc_resend(call, now); goto recheck_state; } -- 2.35.1