From 3fdd5ce3ece26d5fd0d7702e08167bf5e513f620 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Mon, 18 Apr 2016 02:50:12 +0200 Subject: [PATCH 01/10] virtio-scsi: Prevent assertion on missed events RH-Author: Fam Zheng Message-id: <1460947812-5704-1-git-send-email-famz@redhat.com> Patchwork-id: 70202 O-Subject: [RHEL-7.3 qemu-kvm PATCH] virtio-scsi: Prevent assertion on missed events Bugzilla: 1312289 RH-Acked-by: Thomas Huth RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Paolo Bonzini From: Eric Farman In some cases, an unplug can cause events to be dropped, which leads to an assertion failure when preparing to notify the guest kernel. Signed-off-by: Eric Farman Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from commit 49fb65c7f985baa56d2964e0a85c1f098e3e2a9d) Signed-off-by: Fam Zheng Signed-off-by: Miroslav Rezanina --- 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 8232fc9..808eb54 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -530,7 +530,7 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev, evt->event = event; evt->reason = reason; if (!dev) { - assert(event == VIRTIO_SCSI_T_NO_EVENT); + assert(event == VIRTIO_SCSI_T_EVENTS_MISSED); } else { evt->lun[0] = 1; evt->lun[1] = dev->id; -- 1.8.3.1