Blame SOURCES/kvm-xhci-fix-guest-triggerable-assert.patch

1bdc94
From 27d574c17a28134a9e8c5cf12b2ae3635aa339c0 Mon Sep 17 00:00:00 2001
1bdc94
From: Gerd Hoffmann <kraxel@redhat.com>
1bdc94
Date: Wed, 4 Jul 2018 09:00:54 +0200
1bdc94
Subject: [PATCH 12/89] xhci: fix guest-triggerable assert
1bdc94
1bdc94
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
1bdc94
Message-id: <20180704090054.5101-2-kraxel@redhat.com>
1bdc94
Patchwork-id: 81224
1bdc94
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/1] xhci: fix guest-triggerable assert
1bdc94
Bugzilla: 1594135
1bdc94
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
1bdc94
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
1bdc94
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
1bdc94
1bdc94
Set xhci into error state instead of throwing a core dump.
1bdc94
1bdc94
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1bdc94
Message-id: 20180702162752.29233-1-kraxel@redhat.com
1bdc94
(cherry picked from commit 8f36ec708834dfad58af6feb0b69bb0be6077f0f)
1bdc94
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
1bdc94
---
1bdc94
 hw/usb/hcd-xhci.c | 7 ++++++-
1bdc94
 1 file changed, 6 insertions(+), 1 deletion(-)
1bdc94
1bdc94
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
1bdc94
index 181e803..45fcce3 100644
1bdc94
--- a/hw/usb/hcd-xhci.c
1bdc94
+++ b/hw/usb/hcd-xhci.c
1bdc94
@@ -1954,7 +1954,12 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
1bdc94
         for (i = 0; i < length; i++) {
1bdc94
             TRBType type;
1bdc94
             type = xhci_ring_fetch(xhci, ring, &xfer->trbs[i], NULL);
1bdc94
-            assert(type);
1bdc94
+            if (!type) {
1bdc94
+                xhci_die(xhci);
1bdc94
+                xhci_ep_free_xfer(xfer);
1bdc94
+                epctx->kick_active--;
1bdc94
+                return;
1bdc94
+            }
1bdc94
         }
1bdc94
         xfer->streamid = streamid;
1bdc94
 
1bdc94
-- 
1bdc94
1.8.3.1
1bdc94