]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
RGW: remove custom copy constructor for RGWObjectCtx and enforce no copy/move 67440/head
authorOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 4 Dec 2025 00:53:02 +0000 (00:53 +0000)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 19 Feb 2026 21:51:30 +0000 (21:51 +0000)
commita83c6cee1bc048a7fc6520dd7b6ab753409e6aa9
tree2621b2e765774c35770bef0c8ba3c2ef3e40a292
parentc824a7fa29b067db9ce5a381f59b175918299919
RGW: remove custom copy constructor for RGWObjectCtx and enforce no copy/move

The custom copy constructor allowed RGWObjectCtx to be copied without
locking the source, enabling concurrent modifications of objs_state
during std::_Rb_tree::_M_copy(). This could corrupt the map and cause
crashes during copy or destruction. Since RGWObjectCtx is not meant to
be copied or moved, remove the custom copy constructor and rely on the
type's natural non-copyable semantics, with static assertions enforcing
the contract.

Related to: https://tracker.ceph.com/issues/62063
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit aaa0bf7ce8a31a84fb95ad1c01dbdb0752be9543)
src/rgw/driver/rados/rgw_rados.h
src/test/rgw/CMakeLists.txt
src/test/rgw/test_rgw_object_ctx.cc [new file with mode: 0644]