Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2930461iog; Mon, 20 Jun 2022 07:43:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twkoOWWrys92vGyFR+DrnfRLsOaOpZ6TA3NvWq7Y6cvtbdVc5a3rL9Mra/zwu3kXY3TBDj X-Received: by 2002:a17:90a:5911:b0:1ec:9e24:c671 with SMTP id k17-20020a17090a591100b001ec9e24c671mr8504706pji.173.1655736204578; Mon, 20 Jun 2022 07:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736204; cv=none; d=google.com; s=arc-20160816; b=mmBsFShOc8sNrybF7xK4pOLzryOLFmM2KKhpdrCLTuEjpkRhTvwRgTjIXjEP9uV3kU kpHiwl6p66E9J3QA/zlcwNqs3CWZmP6uHNF+ONvDmbBf4QOvjOCzZLMQIsvno9E2vli7 t6oLsqj5zYH3gYfwsjmq+Yj1TDTNPkLpDsM3usKZEHfo6AjdpkNPlR1dozEpvWxmKlGe ioVmK9SZB075wjec8OGo9EJLAhYgXmWVHlsWId3jALBj5a43zHRt9J3Ctb0Dh7mSI6gN 8XBSlqBJ+Qs+WufRTcON8fzG8Oba8r6Be3ZGk3xIkgBbX+6bKpzXIPYC1e9roZyLbMcW OfkA== 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=r4CnfSJtadSy80eiGKcn7vQuq45Uh5MXywFMBXnpREY=; b=d/onK+eTOVRJyGx7ktI6RbxwYSbYCTqi45C/whezDTAZtc31jH87sRQ6Xg1O+WtstL VYcao0C0blETzLReaOrlufbyqNMzsWX+q2eqFNPthZ5yAHKPW863vFmV+1t0XmkWioN9 XoINIycUbhusgzZm8X2kUtuFDCwIBQ5EVr+FTh7aKv8U4AJ4IT20v54zw1pCQdqZ/+yh klvm+gxz0QOKSqJBUEu6756g3WT0nGoXoJOybqv1NzcdDxoJt6IyJ6NgmiohmbQOmfnV pDLBHX0Q1z2Zcv0i07LBQ9ljW387Jvjb54mHqHvtfabg3NHpaOEV9IvR8xogAr4e6LGp NBVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zUnSa3DT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a62be11000000b0051bbbc5f0aasi14230918pff.261.2022.06.20.07.43.10; Mon, 20 Jun 2022 07:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zUnSa3DT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237936AbiFTNB4 (ORCPT + 99 others); Mon, 20 Jun 2022 09:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238387AbiFTM5r (ORCPT ); Mon, 20 Jun 2022 08:57:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF97A1AF16; Mon, 20 Jun 2022 05:55:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id C8C76B811B3; Mon, 20 Jun 2022 12:55:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2645EC341C4; Mon, 20 Jun 2022 12:55:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729732; bh=YNWu+/GXQUo6nD402dR+q/FDYgLXdn3YWTkwGKNtjQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zUnSa3DTcdlET0doZL0shE2eQIzWjfziKvvC3PkVc+YypdceDghDOXJ5tLYsksXhP 0ZV7sU0zWG+qyn6bZEf/kB/OEwAW70AYKb9UfrZGAIOBCHy6J65XTnD3n8L2n/vAND VNyVtXM859x9NZQh5HSeyv2Lv/cGocilhWYb16bU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Scott Mayhew , Anna Schumaker , Sasha Levin Subject: [PATCH 5.18 056/141] sunrpc: set cl_max_connect when cloning an rpc_clnt Date: Mon, 20 Jun 2022 14:49:54 +0200 Message-Id: <20220620124731.192061123@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@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=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Scott Mayhew [ Upstream commit 304791255a2dc1c9be7e7c8a6cbdb31b6847b0e5 ] If the initial attempt at trunking detection using the krb5i auth flavor fails with -EACCES, -NFS4ERR_CLID_INUSE, or -NFS4ERR_WRONGSEC, then the NFS client tries again using auth_sys, cloning the rpc_clnt in the process. If this second attempt at trunking detection succeeds, then the resulting nfs_client->cl_rpcclient winds up having cl_max_connect=0 and subsequent attempts to add additional transport connections to the rpc_clnt will fail with a message similar to the following being logged: [502044.312640] SUNRPC: reached max allowed number (0) did not add transport to server: 192.168.122.3 Signed-off-by: Scott Mayhew Fixes: dc48e0abee24 ("SUNRPC enforce creation of no more than max_connect xprts") Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin --- net/sunrpc/clnt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index e2c6eca0271b..b6781ada3aa8 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -651,6 +651,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args, new->cl_discrtry = clnt->cl_discrtry; new->cl_chatty = clnt->cl_chatty; new->cl_principal = clnt->cl_principal; + new->cl_max_connect = clnt->cl_max_connect; return new; out_err: -- 2.35.1