diff options
| author | Olga Kornievskaia <okorniev@redhat.com> | 2026-06-25 17:18:52 -0400 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-07-19 21:37:44 -0400 |
| commit | ac8aba075d20869c19e7fa4efbae242d16b2ad63 (patch) | |
| tree | 66ae307650ac94be3105641efc15d242d9f07359 | |
| parent | 0a01e84b4ad593f4f5aafb2e92d5537af9ed5ce8 (diff) | |
| download | linux-next-ac8aba075d20869c19e7fa4efbae242d16b2ad63.tar.gz linux-next-ac8aba075d20869c19e7fa4efbae242d16b2ad63.zip | |
lockd: fix NLMv4 GRANTED_MSG handling
GRANTED_MSG is a server-to-client callback, so it runs on the client,
where nfsd never registers nlmsvc_ops. The nlm4svc_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 nlm4svc_lookup_host(), which
results in a client failing a GRANTED_MSG call, call
nlmsvc_lookup_host().
Fixes: 62721885e861 ("lockd: Use xdrgen XDR functions for the NLMv4 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>
| -rw-r--r-- | fs/lockd/svc4proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index 080dffce9d8e..b73004a7987e 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -872,7 +872,8 @@ static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp) struct nlm4_testargs_wrapper *argp = rqstp->rq_argp; struct nlm_host *host; - host = nlm4svc_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; |
