]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: assert if compiled code doesn't support the configured ms_async_transport_type 12559/head
authorAvner BenHanoch <avnerb@mellanox.com>
Mon, 5 Dec 2016 08:16:02 +0000 (08:16 +0000)
committerAdir Lev <adirl@mellanox.com>
Fri, 23 Dec 2016 11:59:00 +0000 (13:59 +0200)
for example, currently there is a crash when using the async stack (access of null pointer)
in case the user configured rdma for a code that was not compiled with RDMA

issue: 913397

Change-Id: I4e3d88006312a713b8d3aaefbdcd0596039270e1
Signed-off-by: Avner BenHanoch <avnerb@mellanox.com>
src/msg/async/Stack.cc

index d0c735b3aeeb3beb7efed89425c9ac30e8511258..d81241eb8aaf4bd1c3321f04c5fe842a0932627c 100644 (file)
@@ -68,6 +68,9 @@ std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, const string
     return std::make_shared<DPDKStack>(c, t);
 #endif
 
+  lderr(c) << __func__ << " ms_async_transport_type " << t <<
+    " is not supported! " << dendl;
+  ceph_abort();
   return nullptr;
 }
 
@@ -83,6 +86,10 @@ Worker* NetworkStack::create_worker(CephContext *c, const string &type, unsigned
   else if (type == "dpdk")
     return new DPDKWorker(c, i);
 #endif
+
+  lderr(c) << __func__ << " ms_async_transport_type " << type <<
+    " is not supported! " << dendl;
+  ceph_abort();
   return nullptr;
 }