Patch "NFSD fixing possible null pointer derefering in copy offload" has been added to the 5.5-stable tree
Quoted 38 lines · Sasha Levin
This is a note to let you know that I've just added the patch titled
NFSD fixing possible null pointer derefering in copy offload
to the 5.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
nfsd-fixing-possible-null-pointer-derefering-in-copy.patch
and it can be found in the queue-5.5 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
commit
a264e7b209f248f59b4fee0d1ed3fbde014a942eAuthor: Olga Kornievskaia <[email protected]> Date: Wed Dec 4 15:13:54 2019 -0500NFSD fixing possible null pointer derefering in copy offload
[ Upstream commit
2e577f0faca4640348c398cb85d60a1eedac4b1e]Static checker revealed possible error path leading to possible NULL pointer dereferencing.
Reported-by Dan Carpenter <[email protected]>Fixes e0639dc5805a: ("NFSD introduce async copy feature")Signed-off-by Olga Kornievskaia <[email protected]>Signed-off-by J. Bruce Fields <[email protected]>Signed-off-by Sasha Levin <[email protected]>fs/nfsd/nfs4proc.c +0
-0
fs/nfsd/nfs4proc.c static void cleanup_async_copy(struct nfsd4_copy *copy) · line 1230
Quoted 9 lines
fs/nfsd/nfs4proc.c +2
-1@@ -1223,7 +1223,8 @@ static void cleanup_async_copy(struct nfsd4_copy *copy) {nfs4_free_cp_state (copy);nfsd_file_put (copy->nf_dst); -nfsd_file_put (copy->nf_src); +if (copy->cp_intra) +nfsd_file_put (copy->nf_src);spin_lock (©->cp_clp->async_lock);list_del (©->copies);spin_unlock (©->cp_clp->async_lock);
This breaks the build here, and in 5.4, so I'll go drop it from both trees :(
thanks,
greg k-h
Quoted 38 lines · Sasha Levin
This is a note to let you know that I've just added the patch titled
NFSD fixing possible null pointer derefering in copy offload
to the 5.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
nfsd-fixing-possible-null-pointer-derefering-in-copy.patch
and it can be found in the queue-5.5 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
commit
a264e7b209f248f59b4fee0d1ed3fbde014a942eAuthor: Olga Kornievskaia <[email protected]> Date: Wed Dec 4 15:13:54 2019 -0500NFSD fixing possible null pointer derefering in copy offload
[ Upstream commit
2e577f0faca4640348c398cb85d60a1eedac4b1e]Static checker revealed possible error path leading to possible NULL pointer dereferencing.
Reported-by Dan Carpenter <[email protected]>Fixes e0639dc5805a: ("NFSD introduce async copy feature")Signed-off-by Olga Kornievskaia <[email protected]>Signed-off-by J. Bruce Fields <[email protected]>Signed-off-by Sasha Levin <[email protected]>fs/nfsd/nfs4proc.c +0
-0
fs/nfsd/nfs4proc.c static void cleanup_async_copy(struct nfsd4_copy *copy) · line 1227
Quoted 6 lines
fs/nfsd/nfs4proc.c +2
-1@@ -1223,7 +1223,8 @@ static void cleanup_async_copy(struct nfsd4_copy *copy) {nfs4_free_cp_state (copy);nfsd_file_put (copy->nf_dst); -nfsd_file_put (copy->nf_src); +if (copy->cp_intra) +nfsd_file_put (copy->nf_src);
And shouldn't this patch just be:
if (copy->nf_src)
instead?