nvmf/vfio-user: check ADMIN command PSDT field
Previously we used assert for this check. Fix #2141. Change-Id: Ieaf8e34721a5b65e6d7790d56587239e2e6d75f4 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9383 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
f7b9f80b32
commit
7ebcd64889
@ -2613,7 +2613,10 @@ map_admin_cmd_req(struct nvmf_vfio_user_ctrlr *ctrlr, struct spdk_nvmf_request *
|
||||
}
|
||||
|
||||
/* ADMIN command will not use SGL */
|
||||
assert(req->cmd->nvme_cmd.psdt == 0);
|
||||
if (req->cmd->nvme_cmd.psdt != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
iovcnt = vfio_user_map_cmd(ctrlr, req, req->iov, len);
|
||||
if (iovcnt < 0) {
|
||||
SPDK_ERRLOG("%s: map Admin Opc %x failed\n",
|
||||
|
Loading…
Reference in New Issue
Block a user