Commit e72453b3 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvmf/vfio-user: don't unmap commands without data buffers



libvfio-user will assert if the command didn't have data
buffers.

Fix issue #2124.

Change-Id: I43e9562c614bc65e54dbf650447369317c10f7b5
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9264


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
Reviewed-by: default avatarThanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: default avatarJohn Levon <levon@movementarian.org>
parent a89d15e4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1328,7 +1328,9 @@ handle_cmd_rsp(struct nvmf_vfio_user_req *vu_req, void *cb_arg)
	assert(vu_req != NULL);
	assert(vu_ctrlr != NULL);

	if (spdk_likely(vu_req->iovcnt)) {
		vfu_unmap_sg(vu_ctrlr->endpoint->vfu_ctx, vu_req->sg, vu_req->iov, vu_req->iovcnt);
	}
	sqid = vu_qpair->qpair.qid;
	cqid = vu_ctrlr->qp[sqid]->sq.cqid;