qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH] virtio-scsi: fix object check failure


From: Paolo Bonzini
Subject: Re: [Qemu-stable] [PATCH] virtio-scsi: fix object check failure
Date: Wed, 18 Jun 2014 14:29:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 18/06/2014 14:13, Ming Lei ha scritto:
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);


This should never be triggered by vhost-scsi.  Perhaps a bug in the kernel?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]