linux-stable/net/sunrpc
Chuck Lever 58e1a7f907 SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
[ Upstream commit 6c254bf3b6 ]

I found that NFSD's new NFSv3 READDIRPLUS XDR encoder was screwing up
right at the end of the page array. xdr_get_next_encode_buffer() does
not compute the value of xdr->end correctly:

 * The check to see if we're on the final available page in xdr->buf
   needs to account for the space consumed by @nbytes.

 * The new xdr->end value needs to account for the portion of @nbytes
   that is to be encoded into the previous buffer.

Fixes: 2825a7f907 ("nfsd4: allow encoding across page boundaries")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Reviewed-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:31 +02:00
..
auth_gss SUNRPC: Ensure that the gssproxy client can start in a connected state 2022-05-18 10:28:22 +02:00
xprtrdma SUNRPC: Trap RDMA segment overflows 2022-06-14 18:41:29 +02: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
addr.c nfsd: don't alloc under spinlock in rpc_parse_scope_id 2021-09-21 17:51:47 -04:00
auth.c sunrpc: add missing newline when printing parameter 'auth_hashtable_size' by sysfs 2020-06-11 13:33:48 -04:00
auth_null.c
auth_unix.c
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 proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
clnt.c SUNRPC: Ensure that the gssproxy client can start in a connected state 2022-05-18 10:28:22 +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
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-01-24 14:17:02 +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 19:27:25 +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
stats.c proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
sunrpc.h Replace HTTP links with HTTPS ones: NFS, SUNRPC, and LOCKD clients 2020-09-21 10:21:10 -04:00
sunrpc_syms.c sunrpc: add IDs to multipath 2021-07-08 14:03:23 -04:00
svc.c lockd: use svc_set_num_threads() for thread start and stop 2021-12-13 13:42:58 -05:00
svc_xprt.c SUNRPC: Fix NFSD's request deferral on RDMA transports 2022-04-20 09:36:24 +02:00
svcauth.c SUNRPC: Add svc_rqst::rq_auth_stat 2021-08-10 14:18:35 -04:00
svcauth_unix.c SUNRPC: Set rq_auth_stat in the pg_authenticate() callout 2021-08-10 14:18:35 -04:00
svcsock.c SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec() 2022-04-13 19:27:34 +02:00
sysctl.c net/sunrpc: fix useless comparison in proc_do_xprt() 2020-11-08 16:28:25 -05:00
sysfs.c SUNRPC: Do not dereference non-socket transports in sysfs 2022-04-08 13:57:17 +02:00
sysfs.h SUNRPC: take a xprt offline using sysfs 2021-07-08 14:03:24 -04:00
timer.c
xdr.c SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer() 2022-06-14 18:41:31 +02:00
xprt.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-04-13 19:27:40 +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: Don't leak sockets in xs_local_connect() 2022-05-12 12:32:37 +02:00