linux/net/sunrpc
Scott Mayhew 5967a69008 sunrpc: set cl_max_connect when cloning an rpc_clnt
[ Upstream commit 304791255a ]

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: dc48e0abee ("SUNRPC enforce creation of no more than max_connect xprts")
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-22 14:21:59 +02:00
..
auth_gss SUNRPC: Ensure that the gssproxy client can start in a connected state 2022-05-18 10:26:56 +02:00
xprtrdma SUNRPC: Trap RDMA segment overflows 2022-06-14 18:36:16 +02:00
addr.c nfsd: don't alloc under spinlock in rpc_parse_scope_id 2021-11-18 19:16:58 +01:00
auth_null.c SUNRPC: Add rpc_auth::au_ralign field 2019-02-14 11:48:36 -05:00
auth_unix.c SUNRPC: Use the client user namespace when encoding creds 2019-04-26 16:24:32 -04:00
auth.c sunrpc: add missing newline when printing parameter 'auth_hashtable_size' by sysfs 2020-06-11 13:33:48 -04:00
backchannel_rqst.c The one new feature this time, from Anna Schumaker, is READ_PLUS, which 2020-10-22 09:44:27 -07:00
cache.c SUNRPC: improve error response to over-size gss credential 2021-09-03 13:38:11 -04:00
clnt.c sunrpc: set cl_max_connect when cloning an rpc_clnt 2022-06-22 14:21:59 +02:00
debugfs.c NFS Client Updates for Linux 5.15 2021-09-04 10:25:26 -07:00
fail.h SUNRPC: Server-side disconnect injection 2021-08-20 13:50:33 -04:00
Kconfig SUNRPC: remove RC4-HMAC-MD5 support from KerberosV 2020-09-11 14:39:15 +10:00
Makefile sunrpc: Create a sunrpc directory under /sys/kernel/ 2021-07-08 14:03:23 -04:00
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-02-01 17:27:01 +01:00
rpcb_clnt.c sunrpc: honor rpc_task's timeout value in rpcb_create() 2021-04-05 09:04:21 -04:00
sched.c SUNRPC: remove scheduling boost for "SWAPPER" tasks. 2022-04-13 20:59:12 +02:00
socklib.c skb_copy_and_csum_bits(): don't bother with the last argument 2020-08-20 15:45:13 -04:00
socklib.h SUNRPC: Refactor xs_sendpages() 2020-03-16 12:04:33 -04:00
stats.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
sunrpc_syms.c sunrpc: add IDs to multipath 2021-07-08 14:03:23 -04:00
sunrpc.h Replace HTTP links with HTTPS ones: NFS, SUNRPC, and LOCKD clients 2020-09-21 10:21:10 -04:00
svc_xprt.c SUNRPC: Fix NFSD's request deferral on RDMA transports 2022-04-20 09:34:18 +02:00
svc.c NFSD: Have legacy NFSD WRITE decoders use xdr_stream_subsegment() 2022-03-08 19:12:33 +01:00
svcauth_unix.c SUNRPC: Set rq_auth_stat in the pg_authenticate() callout 2021-08-10 14:18:35 -04:00
svcauth.c SUNRPC: Add svc_rqst::rq_auth_stat 2021-08-10 14:18:35 -04:00
svcsock.c SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec() 2022-04-13 20:59:20 +02:00
sysctl.c net/sunrpc: fix useless comparison in proc_do_xprt() 2020-11-08 16:28:25 -05:00
sysfs.c sunrpc: Fix potential race conditions in rpc_sysfs_xprt_state_change() 2022-02-16 12:56:10 +01:00
sysfs.h SUNRPC: take a xprt offline using sysfs 2021-07-08 14:03:24 -04:00
timer.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xdr.c SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer() 2022-06-14 18:36:18 +02:00
xprt.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-18 10:26:57 +02:00
xprtmultipath.c SUNRPC keep track of number of transports to unique addresses 2021-08-27 16:36:53 -04:00
xprtsock.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-18 10:26:57 +02:00