virtio: zero-out virtqueue structures at init
They used to be allocated with spdk_dma_zmalloc() which did provide zeroed memory, but we unintentionally changed that when switching to posix_memalign. The structure might have some unitialized memory, so with this patch we just memset it right after allocating it. Change-Id: Id5a5685e09419901513925abaeed605c36f5199a Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451546 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
fc45844cf5
commit
12f622b769
@ -145,6 +145,7 @@ virtio_init_queue(struct virtio_dev *dev, uint16_t vtpci_queue_idx)
|
||||
SPDK_ERRLOG("can not allocate vq\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(vq, 0, size);
|
||||
dev->vqs[vtpci_queue_idx] = vq;
|
||||
|
||||
vq->vdev = dev;
|
||||
|
Loading…
Reference in New Issue
Block a user