mirror-linux/include/linux/sunrpc
Jeff Layton 6b3b697d65 sunrpc: allocate a separate bvec array for socket sends
svc_tcp_sendmsg() calls xdr_buf_to_bvec() with the second slot of
rq_bvec as the start, but doesn't reduce the array length by one, which
could lead to an array overrun. Also, rq_bvec is always rq_maxpages in
length, which can be too short in some cases, since the TCP record
marker consumes a slot.

Fix both problems by adding a separate bvec array to the svc_sock that
is specifically for sending. For TCP, make this array one slot longer
than rq_maxpages, to account for the record marker. For UDP, only
allocate as large an array as we need since it's limited to 64k of
payload.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2025-11-16 18:20:11 -05:00
..
xdrgen
addr.h
auth.h
auth_gss.h
bc_xprt.h
cache.h
clnt.h
debug.h sunrpc: add a Kconfig option to redirect dfprintk() output to trace buffer 2025-09-23 13:28:19 -04:00
gss_api.h
gss_err.h
gss_krb5.h
metrics.h
msg_prot.h
rdma_rn.h
rpc_pipe_fs.h
rpc_rdma.h
rpc_rdma_cid.h
sched.h
stats.h
svc.h SUNRPC: Update svcxdr_init_decode() to call xdr_set_scratch_folio() 2025-09-23 13:29:50 -04:00
svc_rdma.h svcrdma: Increase the server's default RPC/RDMA credit grant 2025-11-16 18:20:11 -05:00
svc_rdma_pcl.h
svc_xprt.h SUNRPC: Move the svc_rpcb_cleanup() call sites 2025-09-23 13:28:19 -04:00
svcauth.h
svcauth_gss.h
svcsock.h sunrpc: allocate a separate bvec array for socket sends 2025-11-16 18:20:11 -05:00
timer.h
types.h
xdr.h NFSD 6.18 Release Notes 2025-10-06 13:22:21 -07:00
xprt.h
xprtmultipath.h
xprtrdma.h
xprtsock.h