diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2023-01-08 17:30:59 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-02-20 15:20:31 +0100 |
commit | cee4db19452467eef8ab93c6eb6a3a84d11d25d7 (patch) | |
tree | 369c16a9d71caf639cf108133938e6d5ca925ad7 /fs/lockd | |
parent | SUNRPC: Remove no-longer-used helper functions (diff) | |
download | linux-cee4db19452467eef8ab93c6eb6a3a84d11d25d7.tar.xz linux-cee4db19452467eef8ab93c6eb6a3a84d11d25d7.zip |
SUNRPC: Refactor RPC server dispatch method
Currently, svcauth_gss_accept() pre-reserves response buffer space
for the RPC payload length and GSS sequence number before returning
to the dispatcher, which then adds the header's accept_stat field.
The problem is the accept_stat field is supposed to go before the
length and seq_num fields. So svcauth_gss_release() has to relocate
the accept_stat value (see svcauth_gss_prepare_to_wrap()).
To enable these fields to be added to the response buffer in the
correct (final) order, the pointer to the accept_stat has to be made
available to svcauth_gss_accept() so that it can set it before
reserving space for the length and seq_num fields.
As a first step, move the pointer to the location of the accept_stat
field into struct svc_rqst.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/svc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 642e394e7a2d..0b28a6cf9303 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -685,15 +685,15 @@ module_exit(exit_nlm); /** * nlmsvc_dispatch - Process an NLM Request * @rqstp: incoming request - * @statp: pointer to location of accept_stat field in RPC Reply buffer * * Return values: * %0: Processing complete; do not send a Reply * %1: Processing complete; send Reply in rqstp->rq_res */ -static int nlmsvc_dispatch(struct svc_rqst *rqstp, __be32 *statp) +static int nlmsvc_dispatch(struct svc_rqst *rqstp) { const struct svc_procedure *procp = rqstp->rq_procinfo; + __be32 *statp = rqstp->rq_accept_statp; if (!procp->pc_decode(rqstp, &rqstp->rq_arg_stream)) goto out_decode_err; |