* [PATCH] nfsd: put the export reference in nfsd4_verify_deleg_dentry
@ 2022-11-08 16:23 Jeff Layton
2022-11-08 16:39 ` Chuck Lever III
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2022-11-08 16:23 UTC (permalink / raw)
To: chuck.lever; +Cc: linux-nfs, Yongcheng Yang
nfsd_lookup_dentry returns an export reference in addition to the dentry
ref. Ensure that we put it too.
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2138866
Fixes: 876c553cb410 ("NFSD: verify the opened dentry after setting a delegation")
Reported-by: Yongcheng Yang <yoyang@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/nfs4state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 554c4e50caf8..2ec981fd2985 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5407,6 +5407,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp,
if (err)
return -EAGAIN;
+ exp_put(exp);
dput(child);
if (child != file_dentry(fp->fi_deleg_file->nf_file))
return -EAGAIN;
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfsd: put the export reference in nfsd4_verify_deleg_dentry
2022-11-08 16:23 [PATCH] nfsd: put the export reference in nfsd4_verify_deleg_dentry Jeff Layton
@ 2022-11-08 16:39 ` Chuck Lever III
0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever III @ 2022-11-08 16:39 UTC (permalink / raw)
To: Jeff Layton, Yongcheng Yang; +Cc: Linux NFS Mailing List
> On Nov 8, 2022, at 11:23 AM, Jeff Layton <jlayton@kernel.org> wrote:
>
> nfsd_lookup_dentry returns an export reference in addition to the dentry
> ref. Ensure that we put it too.
>
> Link: https://bugzilla.redhat.com/show_bug.cgi?id=2138866
> Fixes: 876c553cb410 ("NFSD: verify the opened dentry after setting a delegation")
> Reported-by: Yongcheng Yang <yoyang@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Applied to nfsd's for-rc (-> 6.1-rc). Thank you both!
> ---
> fs/nfsd/nfs4state.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 554c4e50caf8..2ec981fd2985 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -5407,6 +5407,7 @@ nfsd4_verify_deleg_dentry(struct nfsd4_open *open, struct nfs4_file *fp,
> if (err)
> return -EAGAIN;
>
> + exp_put(exp);
> dput(child);
> if (child != file_dentry(fp->fi_deleg_file->nf_file))
> return -EAGAIN;
> --
> 2.38.1
>
--
Chuck Lever
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-08 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 16:23 [PATCH] nfsd: put the export reference in nfsd4_verify_deleg_dentry Jeff Layton
2022-11-08 16:39 ` Chuck Lever III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).