|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [qemu-xen staging] vhost-vdpa :Fix Coverity CID 1430270 / CID 1420267
commit 386494f29e2b902bc501176573bb4c69eab666c4
Author: Cindy Lu <lulu@xxxxxxxxxx>
AuthorDate: Fri Jul 10 14:46:42 2020 +0800
Commit: Michael S. Tsirkin <mst@xxxxxxxxxx>
CommitDate: Mon Jul 27 10:28:28 2020 -0400
vhost-vdpa :Fix Coverity CID 1430270 / CID 1420267
In the function vhost_vdpa_dma_map/unmap, The struct msg was not
initialized all its fields.
Signed-off-by: Cindy Lu <lulu@xxxxxxxxxx>
Message-Id: <20200710064642.24505-1-lulu@xxxxxxxxxx>
Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Reviewed-by: Li Qiang <liq3ea@xxxxxxxxx>
Cc: qemu-stable@xxxxxxxxxx
Reviewed-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
---
hw/virtio/vhost-vdpa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 65d5aaf08a..4580f3efd8 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -37,7 +37,7 @@ static bool
vhost_vdpa_listener_skipped_section(MemoryRegionSection *section)
static int vhost_vdpa_dma_map(struct vhost_vdpa *v, hwaddr iova, hwaddr size,
void *vaddr, bool readonly)
{
- struct vhost_msg_v2 msg;
+ struct vhost_msg_v2 msg = {};
int fd = v->device_fd;
int ret = 0;
@@ -60,7 +60,7 @@ static int vhost_vdpa_dma_map(struct vhost_vdpa *v, hwaddr
iova, hwaddr size,
static int vhost_vdpa_dma_unmap(struct vhost_vdpa *v, hwaddr iova,
hwaddr size)
{
- struct vhost_msg_v2 msg;
+ struct vhost_msg_v2 msg = {};
int fd = v->device_fd;
int ret = 0;
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |