From: Sage Weil Date: Thu, 2 May 2019 16:30:09 +0000 (-0500) Subject: osd/PrimaryLogPG: disallow ops on objects with an empty name X-Git-Tag: v15.1.0~2738^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf6e8a4a4db8b7d7101ca80b844ee953aa4580b2;p=ceph.git osd/PrimaryLogPG: disallow ops on objects with an empty name 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 --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 3d6dfb9e6e3f..ff2527251b52 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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: "