diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-11 20:28:26 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-11-11 20:28:26 +0100 |
commit | f9bbe0c99e5b76a76a1a7fe3bbdd7eaab9f5ab57 (patch) | |
tree | b79ab2566772429bf22025ba7ca70b5040916e46 | |
parent | Merge tag 'fixes_for_v6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
parent | nfsd: put the export reference in nfsd4_verify_deleg_dentry (diff) | |
download | linux-f9bbe0c99e5b76a76a1a7fe3bbdd7eaab9f5ab57.tar.xz linux-f9bbe0c99e5b76a76a1a7fe3bbdd7eaab9f5ab57.zip |
Merge tag 'nfsd-6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fixes from Chuck Lever:
- Fix an export leak
- Fix a potential tracepoint crash
* tag 'nfsd-6.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
nfsd: put the export reference in nfsd4_verify_deleg_dentry
nfsd: fix use-after-free in nfsd_file_do_acquire tracepoint
-rw-r--r-- | fs/nfsd/filecache.c | 1 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index adc4e87a71d2..ec3fceb92236 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -1076,6 +1076,7 @@ retry: goto open_file; nfsd_file_slab_free(&nf->nf_rcu); + nf = NULL; if (ret == -EEXIST) goto retry; trace_nfsd_file_insert_err(rqstp, key.inode, may_flags, ret); diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 4e718500a00c..836bd825ca4a 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; |