diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-08-29 21:18:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-18 14:43:20 +0300 |
commit | bf3f35dd1db664d3ebd6d23786051c315b13e85b (patch) | |
tree | 6564391a7bf4a878f3fd5e729f329c58021f6e10 /tools/testing | |
parent | b867838e927232fc37f35b753f03ba888ef14fc5 (diff) | |
download | linux-bf3f35dd1db664d3ebd6d23786051c315b13e85b.tar.xz |
ceph: fix dereference of null pointer cf
commit 05a444d3f90a3c3e6362e88a1bf13e1a60f8cace upstream.
Currently in the case where kmem_cache_alloc fails the null pointer
cf is dereferenced when assigning cf->is_capsnap = false. Fix this
by adding a null pointer check and return path.
Cc: stable@vger.kernel.org
Addresses-Coverity: ("Dereference null return")
Fixes: b2f9fa1f3bd8 ("ceph: correctly handle releasing an embedded cap flush")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions