diff options
author | Matan Breizman <mbreizma@redhat.com> | 2024-09-08 15:49:23 +0200 |
---|---|---|
committer | Matan Breizman <mbreizma@redhat.com> | 2024-09-09 11:38:08 +0200 |
commit | 0d37bc91f4c395c41e5b65426799e0ee38e0a0af (patch) | |
tree | 44d7a15e385ec7f0135561977e2d7b4de9c1da79 /src/crimson/osd/ops_executer.h | |
parent | crimson/osd/ops_executer: avoid seastar::async comment (diff) | |
download | ceph-0d37bc91f4c395c41e5b65426799e0ee38e0a0af.tar.xz ceph-0d37bc91f4c395c41e5b65426799e0ee38e0a0af.zip |
crimson/osd/ops_executer: pass MutFunc by value
Since we now co_await mut_func, we should not pass it by rvalue ref.
```
DEBUG 2024-09-01 15:54:46,212 [shard 0:main] osd - do_osd_ops_execute: object 2:c4c92e5a:::rbd_trash:head submitting txn
=================================================================
==17416==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f590008a430 at pc 0x0000040a367a bp 0x7ffc0b1d5ff0 sp 0x7ffc0b1d5fe0
Address 0x7f590008a430 is located in stack of thread T0 at offset 48 in frame
#0 0x40b0a2b in crimson::osd::PG::do_osd_ops_execute ... lambda(std::error_code const&)#1}&&)::{lambda()#1}::operator()() const (/usr/bin/ceph-osd+0x40b0a2b)
```
Co-authored-by: Xuehan Xu <xuxuehan@qianxin.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | src/crimson/osd/ops_executer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index 0398e30540d..0448be407d8 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -427,7 +427,7 @@ public: const std::vector<OSDOp>& ops, SnapMapper& snap_mapper, OSDriver& osdriver, - MutFunc&& mut_func) &&; + MutFunc mut_func) &&; std::vector<pg_log_entry_t> prepare_transaction( const std::vector<OSDOp>& ops); void fill_op_params(modified_by m); @@ -513,7 +513,7 @@ OpsExecuter::flush_changes_n_do_ops_effects( const std::vector<OSDOp>& ops, SnapMapper& snap_mapper, OSDriver& osdriver, - MutFunc&& mut_func) && + MutFunc mut_func) && { const bool want_mutate = !txn.empty(); // osd_op_params are instantiated by every wr-like operation. |