]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/aio: avoid infinite recursion in aio_abstract() 55625/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 22 Feb 2024 21:54:54 +0000 (16:54 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 23 Feb 2024 18:14:13 +0000 (13:14 -0500)
a recent regression from 320a2179a3c6c1981a0fd2494938515997c1bfad causes
aio_abstract() to recurse when given an empty optional_yield. this is
exposed by the librgw_file tests

Fixes: https://tracker.ceph.com/issues/64543
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0e223fdf43561811dc4ad4fa29979e9f0722fa7f)

src/rgw/rgw_aio.cc

index 1bc50c89229c032f22c1805a87c7e53979f999a4..293dea13217cb16720f356424bd4137e92feef59 100644 (file)
@@ -59,7 +59,7 @@ Aio::OpFunc aio_abstract(librados::IoCtx ctx, Op&& op, jspan_context* trace_ctx
         (void)trace_ctx; // suppress unused trace_ctx warning. until we will support the read op trace
         r.result = ctx.aio_operate(r.obj.oid, s->c, &op, &r.data);
       } else {
-        r.result = ctx.aio_operate(r.obj.oid, s->c, &op, trace_ctx);
+        r.result = ctx.aio_operate(r.obj.oid, s->c, &op, 0, trace_ctx);
       }
       if (r.result < 0) {
         // cb() won't be called, so release everything here
@@ -124,7 +124,7 @@ Aio::OpFunc aio_abstract(librados::IoCtx ctx, Op&& op, optional_yield y, jspan_c
     return aio_abstract(std::move(ctx), std::forward<Op>(op),
                         y.get_io_context(), y.get_yield_context(), trace_ctx);
   }
-  return aio_abstract(std::move(ctx), std::forward<Op>(op), null_yield, trace_ctx);
+  return aio_abstract(std::move(ctx), std::forward<Op>(op), trace_ctx);
 }
 
 } // anonymous namespace