]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: fix use after free error 56462/head
authorZhang Song <zhangsong02@qianxin.com>
Tue, 26 Mar 2024 06:15:35 +0000 (14:15 +0800)
committerZhang Song <zhangsong02@qianxin.com>
Tue, 26 Mar 2024 06:17:02 +0000 (14:17 +0800)
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
src/crimson/os/seastore/seastore.cc

index e29fd4c0ea67a4ded14e80e3b2c25067ceb2cfd5..ac38a978e0db6e7e58424dade9a75f8c9feea952 100644 (file)
@@ -253,7 +253,7 @@ SeaStore::mount_ertr::future<> SeaStore::mount()
   ceph_assert(seastar::this_shard_id() == primary_core);
   return device->mount(
   ).safe_then([this] {
-    auto sec_devices = device->get_sharded_device().get_secondary_devices();
+    auto &sec_devices = device->get_sharded_device().get_secondary_devices();
     return crimson::do_for_each(sec_devices, [this](auto& device_entry) {
       device_id_t id = device_entry.first;
       magic_t magic = device_entry.second.magic;