From 73a171a07c01506132a90deb4341176600d65972 Mon Sep 17 00:00:00 2001 From: Hailiang Wang Date: Fri, 21 Jun 2019 10:49:22 +0800 Subject: [PATCH] rdma: assert ibv_send_wr is not NULL Vhost testing crashed from Nightly testing, because a member access within null pointer of type 'struct ibv_send_wr'. Change-Id: If8f34f23864883ea73516d2d1fe3b30137c04316 Signed-off-by: Hailiang Wang Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458913 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- lib/nvmf/rdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nvmf/rdma.c b/lib/nvmf/rdma.c index 594baae80..f8c0814de 100644 --- a/lib/nvmf/rdma.c +++ b/lib/nvmf/rdma.c @@ -1658,6 +1658,7 @@ nvmf_rdma_request_fill_iovs_multi_sgl(struct spdk_nvmf_rdma_transport *rtranspor /* The first WR must always be the embedded data WR. This is how we unwind them later. */ current_wr = &rdma_req->data.wr; + assert(current_wr != NULL); req->iovcnt = 0; desc = (struct spdk_nvme_sgl_descriptor *)rdma_req->recv->buf + inline_segment->address;