From: Olga Kornievskaia Date: Wed, 4 Dec 2019 20:13:54 +0000 (-0500) Subject: NFSD fixing possible null pointer derefering in copy offload X-Git-Tag: v5.10.7~3674^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18f428d4e2f7eff162d80b2b21689496c4e82afd;p=platform%2Fkernel%2Flinux-rpi.git 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 Fixes: e0639dc5805a: ("NFSD introduce async copy feature") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 38c0aed..4798667 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; }