diff options
author | Jeff Layton <jlayton@kernel.org> | 2022-11-08 17:23:11 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-11-08 17:32:53 +0100 |
commit | 50256e4793a5e5ab77703c82a47344ad2e774a59 (patch) | |
tree | d77e278f92afa40d48c014da1d66aa9b52b18792 | |
parent | nfsd: fix use-after-free in nfsd_file_do_acquire tracepoint (diff) | |
download | linux-50256e4793a5e5ab77703c82a47344ad2e774a59.tar.xz linux-50256e4793a5e5ab77703c82a47344ad2e774a59.zip |
nfsd: put the export reference in nfsd4_verify_deleg_dentry
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>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | fs/nfsd/nfs4state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 198d7abf34e4..4f4706f7139b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5382,6 +5382,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; |