[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH] virtio-scsi: fix object check failure
From: |
Ming Lei |
Subject: |
[Qemu-stable] [PATCH] virtio-scsi: fix object check failure |
Date: |
Wed, 18 Jun 2014 20:13:51 +0800 |
In case of vhost-scsi, the object type of VirtIODevice isn't
VirtIOSCSI, so use the cast trick to fix the problem like
in virtio_scsi_handle_cmd()
Cc: address@hidden
Cc: Anthony Liguori <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Ming Lei <address@hidden>
---
hw/scsi/virtio-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index b0d7517..13700f5 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -538,7 +538,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s,
SCSIDevice *dev,
static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
{
- VirtIOSCSI *s = VIRTIO_SCSI(vdev);
+ VirtIOSCSI *s = (VirtIOSCSI *)vdev;
if (s->events_dropped) {
virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
--
1.7.9.5
- [Qemu-stable] [PATCH] virtio-scsi: fix object check failure,
Ming Lei <=
Re: [Qemu-stable] [Qemu-devel] [PATCH] virtio-scsi: fix object check failure, Andreas Färber, 2014/06/18