From e3b744a19d8ea42e53a6294e698ea3ecf6a4b040 Mon Sep 17 00:00:00 2001 From: Avner BenHanoch Date: Mon, 5 Dec 2016 08:16:02 +0000 Subject: [PATCH] msg/async: assert if compiled code doesn't support the configured ms_async_transport_type 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 --- src/msg/async/Stack.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msg/async/Stack.cc b/src/msg/async/Stack.cc index d0c735b3aeeb3..d81241eb8aaf4 100644 --- a/src/msg/async/Stack.cc +++ b/src/msg/async/Stack.cc @@ -68,6 +68,9 @@ std::shared_ptr NetworkStack::create(CephContext *c, const string return std::make_shared(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; } -- 2.39.5