From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qXI-0006B6-Gl for qemu-devel@nongnu.org; Mon, 13 Aug 2012 05:02:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0qXG-0004em-DA for qemu-devel@nongnu.org; Mon, 13 Aug 2012 05:02:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qXG-0004eQ-4Y for qemu-devel@nongnu.org; Mon, 13 Aug 2012 05:02:06 -0400 Date: Mon, 13 Aug 2012 12:02:59 +0300 From: "Michael S. Tsirkin" Message-ID: <20120813090259.GJ14081@redhat.com> References: <1344846917-7411-1-git-send-email-nab@linux-iscsi.org> <1344846917-7411-7-git-send-email-nab@linux-iscsi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1344846917-7411-7-git-send-email-nab@linux-iscsi.org> Subject: Re: [Qemu-devel] [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Nicholas A. Bellinger" Cc: Stefan Hajnoczi , kvm-devel , Jan Kiszka , qemu-devel , Zhi Yong Wu , Anthony Liguori , target-devel , Hannes Reinecke , Paolo Bonzini , lf-virt , Christoph Hellwig On Mon, Aug 13, 2012 at 08:35:17AM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > 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 > Cc: Stefan Hajnoczi > Cc: Michael S. Tsirkin > Signed-off-by: Nicholas Bellinger This is a bugfix we need even without vhost, right? > --- > 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