]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: check for no-bucket at bucket_lc_process() preamble 56960/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 27 Mar 2024 22:33:56 +0000 (18:33 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 17 Apr 2024 15:33:27 +0000 (11:33 -0400)
Avoids trivial segfault deferencing the bucket pointer.

Fixes: https://tracker.ceph.com/issues/65188
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit d5f6fe772f83d9e6b1ebaafdb1e8274041b0d684)

src/rgw/rgw_lc.cc

index 4eec850eafd1a96afa835144bbfa02e94c711a52..1be5372ae346530d9bcd3065d6c0dd13edfeee78 100644 (file)
@@ -2104,7 +2104,7 @@ int RGWLC::process_bucket(int index, int max_lock_secs, LCWorker* worker,
   }
 
   /* do nothing if no bucket */
-  if (entry->get_bucket().empty()) {
+  if ((! entry) || entry->get_bucket().empty()) {
     return ret;
   }