summary refs log tree commit diff
path: root/fs/ceph/metric.h
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-08-29 19:18:24 +0100
committerIlya Dryomov <idryomov@gmail.com>2021-09-03 10:55:51 +0200
commit05a444d3f90a3c3e6362e88a1bf13e1a60f8cace (patch)
treec8c903b6b92af9be2cfaa031f2569508f81087bd /fs/ceph/metric.h
parent9f3589993c0c69ab9f2401a6b65b21c419b482d6 (diff)
downloadlinux-05a444d3f90a3c3e6362e88a1bf13e1a60f8cace.tar.gz
ceph: fix dereference of null pointer cf
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>
Diffstat (limited to 'fs/ceph/metric.h')
0 files changed, 0 insertions, 0 deletions