summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Farman <farman@linux.vnet.ibm.com>2014-01-14 14:16:26 -0500
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-02-21 00:34:40 -0600
commita5221ee1430928ac013f9723134dacb62359247e (patch)
tree3cb13a694087b2ac9b6b399ca83aa36817cd3fa9
parent30a0fc36075aee75db639db9b9bc70dc682656d7 (diff)
downloadqemu-a5221ee1430928ac013f9723134dacb62359247e.tar.gz
virtio-scsi: Prevent assertion on missed events
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 <farman@linux.vnet.ibm.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 49fb65c7f985baa56d2964e0a85c1f098e3e2a9d) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--hw/scsi/virtio-scsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 5e524b2b13..3fa6d076da 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -520,7 +520,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;