vhost/scsi: handle spdk_vhost_gpa_to_vva() failure

One call to spdk_vhost_gpa_to_vva() was missing a return code check.

Change-Id: I3581ade98f7fbf72419f8216718a17de50bac4b7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408759
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2018-04-23 15:14:07 -07:00
parent 9c7d842cc4
commit 54f59263eb

View File

@ -326,6 +326,11 @@ process_ctrl_request(struct spdk_vhost_scsi_task *task)
}
ctrl_req = spdk_vhost_gpa_to_vva(vdev, desc->addr, sizeof(*ctrl_req));
if (ctrl_req == NULL) {
SPDK_ERRLOG("%s: Invalid task management request at index %d.\n",
vdev->name, task->req_idx);
goto out;
}
SPDK_DEBUGLOG(SPDK_LOG_VHOST_SCSI_QUEUE,
"Processing controlq descriptor: desc %d/%p, desc_addr %p, len %d, flags %d, last_used_idx %d; kickfd %d; size %d\n",