summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorOlga Kornievskaia <olga.kornievskaia@gmail.com>2019-12-04 23:13:54 +0300
committerJ. Bruce Fields <bfields@redhat.com>2019-12-07 19:28:46 +0300
commit18f428d4e2f7eff162d80b2b21689496c4e82afd (patch)
tree7e65826fb0d6e60556396e6dbed892616c739d7f /fs/nfsd/nfs4proc.c
parent466e16f0920f3ffdfa49713212fa334fb3dc08f1 (diff)
downloadlinux-18f428d4e2f7eff162d80b2b21689496c4e82afd.tar.xz
NFSD fixing possible null pointer derefering in copy offload
Static checker revealed possible error path leading to possible NULL pointer dereferencing. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: e0639dc5805a: ("NFSD introduce async copy feature") Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 38c0aeda500e..4798667af647 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1298,7 +1298,8 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
out:
return status;
out_err:
- cleanup_async_copy(async_copy);
+ if (async_copy)
+ cleanup_async_copy(async_copy);
goto out;
}