]> 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 66514/head
authorOguzhan Ozmen <oozmen@bloomberg.net>
Thu, 4 Dec 2025 00:53:02 +0000 (00:53 +0000)
committerOguzhan Ozmen <oozmen@bloomberg.net>
Fri, 5 Dec 2025 16:59:31 +0000 (16:59 +0000)
commitaaa0bf7ce8a31a84fb95ad1c01dbdb0752be9543
treeec5f3b761adb9902ad07654f0c605895571160eb
parentf255e7f77c9409149c0fba19ba3bc87cc2fb3acd
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>
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]