lib/nvmf: sanity check req->iovcnt
If req->data is set, with all the previous changes, then req->iovcnt should also be more than zero. Signed-off-by: John Levon <john.levon@nutanix.com> Change-Id: I29b5f45541c9dba2dd896109dd43d2b5321ec467 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16274 Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
70a82d9a95
commit
11e67d93ff
@ -4498,6 +4498,10 @@ spdk_nvmf_request_exec(struct spdk_nvmf_request *req)
|
||||
struct spdk_nvmf_transport *transport = qpair->transport;
|
||||
enum spdk_nvmf_request_exec_status status;
|
||||
|
||||
if (req->data != NULL) {
|
||||
assert(req->iovcnt > 0);
|
||||
}
|
||||
|
||||
if (!nvmf_check_subsystem_active(req)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user