]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix use-after-move in build_incremental_map_msg() 54267/head
authorRonen Friedman <rfriedma@redhat.com>
Wed, 25 Oct 2023 07:24:18 +0000 (02:24 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 31 Oct 2023 11:31:20 +0000 (13:31 +0200)
Fixes: https://tracker.ceph.com/issues/63310
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 9e2b8b0e8235b36e55310aab49b8f760e8d57cad)

src/osd/OSD.cc

index b4ee3c313cab52c13eb777061514da1fa1713bbb..c61e7d33218abaa74b5ea02d736d03ca0217c4b7 100644 (file)
@@ -1418,14 +1418,14 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to,
   for (epoch_t e = since + 1; e <= to; ++e) {
     bufferlist bl;
     if (get_inc_map_bl(e, bl)) {
-      m->incremental_maps[e] = std::move(bl);
+      m->incremental_maps[e] = bl;
     } else {
       dout(10) << __func__ << " missing incremental map " << e << dendl;
       if (!get_map_bl(e, bl)) {
        derr << __func__ << " also missing full map " << e << dendl;
        goto panic;
       }
-      m->maps[e] = std::move(bl);
+      m->maps[e] = bl;
     }
     max--;
     max_bytes -= bl.length();