]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/datalog: fix LazyFIFO race fix 58491/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 9 Jul 2024 21:40:03 +0000 (17:40 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 9 Jul 2024 22:19:03 +0000 (18:19 -0400)
initialize `fifo_tmp` to prevent the race on member variable `fifo` that
was identified in 8fa844383f9c22e758f39ecdda74f70de054ad68

Fixes: https://tracker.ceph.com/issues/66880
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_log_backing.h

index 6cda9a4ca9787834dc8b35b0a1cb6140082750e2..737d6725eb4386f1d38dc579c6bbd1a96ec6d4eb 100644 (file)
@@ -269,7 +269,7 @@ class LazyFIFO {
       // FIFO supports multiple clients by design, so it's safe to
       // race to create them.
       std::unique_ptr<rgw::cls::fifo::FIFO> fifo_tmp;
-      auto r = rgw::cls::fifo::FIFO::create(dpp, ioctx, oid, &fifo, y);
+      auto r = rgw::cls::fifo::FIFO::create(dpp, ioctx, oid, &fifo_tmp, y);
       if (r) {
        return r;
       }