summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-01-13 14:23:07 +0100
committerJ. Bruce Fields <bfields@redhat.com>2020-02-06 17:22:55 +0100
commit91fd3c3edcd7f223c5340a8324f67b03a85a73aa (patch)
treecaa03958f1e6e725e07530ed3354be5353c4cd56 /fs/nfsd
parentnfsd: convert file cache to use over/underflow safe refcount (diff)
downloadlinux-91fd3c3edcd7f223c5340a8324f67b03a85a73aa.tar.xz
linux-91fd3c3edcd7f223c5340a8324f67b03a85a73aa.zip
nfsd4: fix double free in nfsd4_do_async_copy()
This frees "copy->nf_src" before and again after the goto. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4proc.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index e4ddaf87493a..0e75f7fb5fec 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1469,7 +1469,6 @@ static int nfsd4_do_async_copy(void *data)
copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, &copy->c_fh,
&copy->stateid);
if (IS_ERR(copy->nf_src->nf_file)) {
- kfree(copy->nf_src);
copy->nfserr = nfserr_offload_denied;
nfsd4_interssc_disconnect(copy->ss_mnt);
goto do_callback;