Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2150907iof; Tue, 7 Jun 2022 21:27:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybn9eWlu0Wz+hq/B+Ckuv8Gu/SldzEmaU6KIMcDsEkJptGRuwtebrAn98D7jveq3I+gO9M X-Received: by 2002:a17:902:8c91:b0:167:895f:9684 with SMTP id t17-20020a1709028c9100b00167895f9684mr10418313plo.133.1654662433277; Tue, 07 Jun 2022 21:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662433; cv=none; d=google.com; s=arc-20160816; b=uW6Tf+CMv2v5H1Rt3cLhgwbWG+T48cSK4GyzMeJUWSzDcY9KgXQ5MUK87TTbexPuMF H4MCStX8L8Q3En49Jvhiu2CQy/lSaO5igV7H1lfQGROWfPZ5iGOSf3caHuvMExFiHaJ6 +RcjhditiBqWwKZ+sTFvjyi0rTDcFGOySmalQ8M7BzJbyak+WDneN0IHpJY+do5u/J8/ KtxZSVTcZpMK6s4fASwNO4uaqTWPSlaQQhzjcYR3KJAiRZdgV8V0CldjnnddLvneMITt samJunQwkNTU4E9yq8UcOLGSL1mJyzCc7DEKO18Y/75GB2wpLTwqbG5/ceesNYvzJ28n 9+pQ== 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=IJP82EdrUK45DAVRt7P3WjBwacbN5EcXMFTGf4KPJbAtuvFDTZ+x7t7fUMA/fonnGp j7v/GIaAr7+6OWgnKf43Dx5BqCskcHWfyAf0vxgusOqUE+dpwYe5NgMNJADG2lo9SI7a p3EuPgdx6sqCEiNN7bvqh38mI4fVuvf5DW9cHnaH8s8/tmK+kP9vlxz7N7AGTckT+c/+ yduqJzl/ea0JXNmYTuwMV/8S1pZeykLg9D6XkY3+XVfdJCZTypdT36LiA0bA+V9Ug8+w Qs9KjDIOqZkGyPqWKwZEFPMYzG2+pkeZN0joemh/ggJHMmWhAJ0ZOSx/wluNdh1KDgGR ZKpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I4oumvtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a1-20020a056a000c8100b0051bbbc5f0aasi27025978pfv.261.2022.06.07.21.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:27:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I4oumvtJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 40111237C35; Tue, 7 Jun 2022 20:56:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344442AbiFGRxE (ORCPT + 99 others); Tue, 7 Jun 2022 13:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347806AbiFGRfs (ORCPT ); Tue, 7 Jun 2022 13:35:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B80A410A605; Tue, 7 Jun 2022 10:31:32 -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 56ADC60C7C; Tue, 7 Jun 2022 17:31:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68F32C385A5; Tue, 7 Jun 2022 17:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623091; bh=d5f3waSstqFwsHwR92Wq26SEDDhS6+RyUHdRiynwipA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4oumvtJ/Zw+J4gniIhXwUOfQe2JkxRcEvbpxNZXdhoK7VMGz05bM2mPB7HAz0gFH X8ceJ/N7tiaayJp0c8c2K4ZHBgBPlTH8Bf5z2bXEN33ZKICC/BhiOeS5jEXbkezRv9 d/BIQ5m5K7frtwucWAIeezcqB2NQ5fdAh4gXxMp8= 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.10 251/452] rxrpc: Dont try to resend the request if were receiving the reply Date: Tue, 7 Jun 2022 19:01:48 +0200 Message-Id: <20220607164916.038411271@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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