]> git.proxmox.com Git - mirror_qemu.git/commitdiff
xhci: fix guest triggerable assert
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 5 Nov 2020 13:41:11 +0000 (14:41 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Nov 2020 08:11:21 +0000 (09:11 +0100)
We didn't start any work yet so we can just return
at that point instead of asserting.

Buglink: https://bugs.launchpad.net/qemu/+bug/1883732
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201105134112.25119-6-kraxel@redhat.com

hw/usb/hcd-xhci.c

index 79ce5c4be6c403c474ae06609c69865316d22aec..d00bb0141dac550eb1cba909b9234687a78dc25a 100644 (file)
@@ -1904,7 +1904,9 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
         streamid = 0;
         xhci_set_ep_state(xhci, epctx, NULL, EP_RUNNING);
     }
-    assert(ring->dequeue != 0);
+    if (!ring->dequeue) {
+        return;
+    }
 
     epctx->kick_active++;
     while (1) {