]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: defensive fix for crash attemping part-copy of '%' versioned obj
authormatt benjamin <mbenjamin@redhat.com>
Fri, 16 May 2025 16:02:20 +0000 (12:02 -0400)
committerThomas Serlin <tserlin@redhat.com>
Mon, 22 Sep 2025 19:18:18 +0000 (15:18 -0400)
The proximate cause of the issue actually appears to be in recognizing
the key.name of the object, only failing in rgw_rados due to an assert
on key.name being non-empty.

Resolves: rhbz#2356922

Signed-off-by: matt benjamin <mbenjamin@redhat.com>
(cherry picked from commit 5111b625a174aa2eaeb4be943dec9fe4b9d948af)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/driver/rados/rgw_rados.cc
src/rgw/rgw_op.cc

index 1922202ef93d1892cd24a64133ed14a2651d2c3a..8ab13b3124f84789aa14beb278f8436803948976 100644 (file)
@@ -259,6 +259,7 @@ void RGWObjectCtx::set_atomic(const rgw_obj& obj, bool atomic) {
   assert (!obj.empty());
   objs_state[obj].state.is_atomic = atomic;
 }
+
 void RGWObjectCtx::set_prefetch_data(const rgw_obj& obj) {
   std::unique_lock wl{lock};
   assert (!obj.empty());
index 15f241ffc1905278568c7f5092d89a1eb9bb82da..6ae80e55d5d9c8f67b4adfe3dcc9d781fdb8eaac 100644 (file)
@@ -4117,7 +4117,8 @@ int RGWPutObj::init_processing(optional_yield y) {
 
 int RGWPutObj::verify_permission(optional_yield y)
 {
-  if (! copy_source.empty()) {
+  if (! (copy_source.empty() ||
+        copy_source_object_name.empty())) {
 
     RGWAccessControlPolicy cs_acl;
     boost::optional<Policy> policy;