From: Matt Benjamin Date: Wed, 27 Mar 2024 22:33:56 +0000 (-0400) Subject: rgwlc: check for no-bucket at bucket_lc_process() preamble X-Git-Tag: v19.1.0~58^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a89a0966f83484a6cfc9e7fc79c625a30cbeb0b7;p=ceph.git rgwlc: check for no-bucket at bucket_lc_process() preamble Avoids trivial segfault deferencing the bucket pointer. Fixes: https://tracker.ceph.com/issues/65188 Signed-off-by: Matt Benjamin (cherry picked from commit d5f6fe772f83d9e6b1ebaafdb1e8274041b0d684) --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 4eec850eafd1a..1be5372ae3465 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -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; }