From: Chanyoung Park Date: Tue, 19 Aug 2025 09:14:45 +0000 (+0000) Subject: crimson/.../circular_journal_space: fix boundary check X-Git-Tag: testing/wip-vshankar-testing-20250825.134853-debug~13^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fbe17bf451010d31aa8c31c5305e347971f7cced;p=ceph-ci.git crimson/.../circular_journal_space: fix boundary check Signed-off-by: Chanyoung Park --- diff --git a/src/crimson/os/seastore/journal/circular_journal_space.cc b/src/crimson/os/seastore/journal/circular_journal_space.cc index 29095abf9c3..775f56d5de3 100644 --- a/src/crimson/os/seastore/journal/circular_journal_space.cc +++ b/src/crimson/os/seastore/journal/circular_journal_space.cc @@ -57,8 +57,6 @@ CircularJournalSpace::write(ceph::bufferlist&& to_write) { if (encoded_size > get_records_available_size()) { ceph_abort_msg("should be impossible with EPM reservation"); } - assert(encoded_size + get_rbm_addr(get_written_to()) - < get_journal_end()); auto target = get_rbm_addr(get_written_to()); auto new_written_to = target + encoded_size; @@ -162,7 +160,7 @@ CircularJournalSpace::device_write_bl( { LOG_PREFIX(CircularJournalSpace::device_write_bl); auto length = bl.length(); - if (offset + length > get_journal_end()) { + if (offset + length >= get_journal_end()) { return crimson::ct_error::erange::make(); } DEBUG(