From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlKD-0006WY-T7 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:19:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGlK2-0001tK-J1 for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:19:13 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:60446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGlK2-0001t1-BF for qemu-devel@nongnu.org; Fri, 21 Feb 2014 03:19:02 -0500 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Feb 2014 01:19:02 -0700 From: Michael Roth Date: Fri, 21 Feb 2014 02:17:21 -0600 Message-Id: <1392970647-21528-46-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1392970647-21528-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 45/51] virtio-scsi: Prevent assertion on missed events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lersek@redhat.com, qemu-stable@nongnu.org, Petar.Jovanovic@imgtec.com 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: Michael Roth --- 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 5e524b2..3fa6d07 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; -- 1.7.9.5