qemu-devel
[Top][All Lists]
Advanced

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

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


From: Ming Lei
Subject: Re: [Qemu-devel] [PATCH] virtio-scsi: fix object check failure
Date: Wed, 18 Jun 2014 22:18:05 +0800

On Wed, Jun 18, 2014 at 8:29 PM, Paolo Bonzini <address@hidden> wrote:
> 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?

It can be triggered with rmmod, system suspend, reboot...

Thanks,
--
Ming Lei



reply via email to

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