diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-08-12 23:35:48 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-08-16 18:54:17 -0700 |
commit | 4a29e631f42b0428ea8b108457b4f60cc8a6fcc4 (patch) | |
tree | 96bff9c49f10d3d93eaf906361bb654d59af8fb4 | |
parent | 1e08bc3ccbbc8db182bbb2f0237929b3649b9dbe (diff) | |
download | qemu-kvm-vhost-scsi-merge.tar.gz |
virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definitionvhost-scsi-merge
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 <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | 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 5e2ff6b313c..2c70f897b79 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; |