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: Ubuntu-5.3.0-41.33~225 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e26558ca9625b41c08ea49e0f527755b90669640;p=mirror_ubuntu-eoan-kernel.git NFSD fixing possible null pointer derefering in copy offload BugLink: https://bugs.launchpad.net/bugs/1862227 commit 18f428d4e2f7eff162d80b2b21689496c4e82afd upstream. 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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa Signed-off-by: Khalid Elmously --- diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index c187d892e656..bff38e0ff0cf 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1303,7 +1303,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; }