mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
lockd: fix NLMv3 GRANTED_MSG handling
GRANTED_MSG is a server-to-client callback, so it runs on the client,
where nfsd never registers nlmsvc_ops. The nlm3svc_lookup_host()
helper is for the server-side request handlers
(TEST/LOCK/CANCEL/UNLOCK), which reach nlmsvc_ops->fopen and must
reject requests when nfsd isn't running. GRANTED_MSG only calls
nlmclnt_grant(). Instead, of calling nlm3svc_lookup_host(), which
results in a client failing a GRANTED_MSG call, call
nlmsvc_lookup_host().
Fixes: 6c534ad999 ("lockd: Use xdrgen XDR functions for the NLMv3 GRANTED_MSG procedure")
Cc: stable@vger.kernel.org
Signed-off-by: Olga Kornievskaia <okorniev@redhat.com>
Reviewed-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260625211852.31972-1-okorniev@redhat.com
Signed-off-by: Chuck Lever <cel@kernel.org>
This commit is contained in:
parent
92ea163c77
commit
5c4851e4cd
|
|
@ -901,7 +901,8 @@ static __be32 nlmsvc_proc_granted_msg(struct svc_rqst *rqstp)
|
|||
if (argp->xdrgen.cookie.len > NLM_MAXCOOKIELEN)
|
||||
return rpc_garbage_args;
|
||||
|
||||
host = nlm3svc_lookup_host(rqstp, argp->xdrgen.alock.caller_name, false);
|
||||
host = nlmsvc_lookup_host(rqstp, argp->xdrgen.alock.caller_name.data,
|
||||
argp->xdrgen.alock.caller_name.len);
|
||||
if (!host)
|
||||
return rpc_system_err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user