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: v20.0.0~2212^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d5f6fe772f83d9e6b1ebaafdb1e8274041b0d684;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 --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index deb74465600b2..1d73463b70989 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; }