[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs
From: |
Nicholas A. Bellinger |
Subject: |
[Qemu-devel] [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition |
Date: |
Mon, 13 Aug 2012 08:35:17 +0000 |
From: Nicholas Bellinger <address@hidden>
This patch fixes bug in the definition of VirtIOSCSI->cmd_vqs[0],
where the return of virtio_add_queue() in virtio_scsi_init() ends up
overwriting past the end of ->cmd_vqs[0].
Since virtio_scsi currently assumes a single vqs for data, this patch
simply changes ->cmd_vqs[1] to handle the single VirtQueue.
Cc: Paolo Bonzini <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Signed-off-by: Nicholas Bellinger <address@hidden>
---
hw/virtio-scsi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c
index 5e2ff6b..2c70f89 100644
--- a/hw/virtio-scsi.c
+++ b/hw/virtio-scsi.c
@@ -150,7 +150,7 @@ typedef struct {
bool events_dropped;
VirtQueue *ctrl_vq;
VirtQueue *event_vq;
- VirtQueue *cmd_vqs[0];
+ VirtQueue *cmd_vqs[1];
bool vhost_started;
VHostSCSI *vhost_scsi;
--
1.7.2.5
- Re: [Qemu-devel] [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection, (continued)
Re: [Qemu-devel] [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection, Blue Swirl, 2012/08/13
[Qemu-devel] [RFC-v2 2/6] vhost: Pass device path to vhost_dev_init(), Nicholas A. Bellinger, 2012/08/13
[Qemu-devel] [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi, Nicholas A. Bellinger, 2012/08/13
[Qemu-devel] [RFC-v2 5/6] virtio-scsi: Set max_target=0 during vhost-scsi operation, Nicholas A. Bellinger, 2012/08/13
[Qemu-devel] [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition,
Nicholas A. Bellinger <=
[Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost, Nicholas A. Bellinger, 2012/08/13