Skip to content

Commit

Permalink
xhci: fix guest-triggerable assert
Browse files Browse the repository at this point in the history
Set xhci into error state instead of throwing a core dump.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180702162752.29233-1-kraxel@redhat.com
  • Loading branch information
kraxel committed Jul 3, 2018
1 parent 8bb01b2 commit 8f36ec7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hw/usb/hcd-xhci.c
Expand Up @@ -1954,7 +1954,12 @@ static void xhci_kick_epctx(XHCIEPContext *epctx, unsigned int streamid)
for (i = 0; i < length; i++) {
TRBType type;
type = xhci_ring_fetch(xhci, ring, &xfer->trbs[i], NULL);
assert(type);
if (!type) {
xhci_die(xhci);
xhci_ep_free_xfer(xfer);
epctx->kick_active--;
return;
}
}
xfer->streamid = streamid;

Expand Down

0 comments on commit 8f36ec7

Please sign in to comment.