summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2022-06-01 13:34:49 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2022-06-07 10:36:33 -0400
commit304791255a2dc1c9be7e7c8a6cbdb31b6847b0e5 (patch)
treeb3a4945b24a1fcd350fb951284e0860b80cd0000 /net
parent880265c77ac415090090d1fe72a188fee71cb458 (diff)
downloadlinux-stable-304791255a2dc1c9be7e7c8a6cbdb31b6847b0e5.tar.gz
linux-stable-304791255a2dc1c9be7e7c8a6cbdb31b6847b0e5.tar.bz2
linux-stable-304791255a2dc1c9be7e7c8a6cbdb31b6847b0e5.zip
sunrpc: set cl_max_connect when cloning an rpc_clnt
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 <smayhew@redhat.com> Fixes: dc48e0abee24 ("SUNRPC enforce creation of no more than max_connect xprts") Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/clnt.c1
1 files changed, 1 insertions, 0 deletions
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: