]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: disallow ops on objects with an empty name
authorSage Weil <sage@redhat.com>
Thu, 2 May 2019 16:30:09 +0000 (11:30 -0500)
committerSage Weil <sage@redhat.com>
Mon, 6 May 2019 02:14:18 +0000 (21:14 -0500)
These may conflict with pgmeta objects.  And are going to cause other
problems later (e.g., https://tracker.ceph.com/issues/38724).

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index 3d6dfb9e6e3f96bff6c640ee382e32c50562d063..ff2527251b52a8734d8345e45daee349817cbd7d 100644 (file)
@@ -1858,6 +1858,11 @@ void PrimaryLogPG::do_op(OpRequestRef& op)
     osd->reply_op_error(op, -ENAMETOOLONG);
     return;
   }
+  if (m->get_hobj().oid.name.empty()) {
+    dout(4) << "do_op empty oid name is not allowed" << dendl;
+    osd->reply_op_error(op, -EINVAL);
+    return;
+  }
 
   if (int r = osd->store->validate_hobject_key(head)) {
     dout(4) << "do_op object " << head << " invalid for backing store: "