Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2016 23:40:26 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303349 - head/usr.sbin/bhyve
Message-ID:  <201607262340.u6QNeQBV019122@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Tue Jul 26 23:40:25 2016
New Revision: 303349
URL: https://svnweb.freebsd.org/changeset/base/303349

Log:
  Catch another case where an XHCI interrupt was being
  injected without state being set up.
  
  This fixes a core dump when dropping to the UEFI prompt
  with graphics enabled and moving the mouse around.
  
  Discussed with:	Leon Dang
  MFC after:	3 days

Modified:
  head/usr.sbin/bhyve/pci_xhci.c

Modified: head/usr.sbin/bhyve/pci_xhci.c
==============================================================================
--- head/usr.sbin/bhyve/pci_xhci.c	Tue Jul 26 23:29:37 2016	(r303348)
+++ head/usr.sbin/bhyve/pci_xhci.c	Tue Jul 26 23:40:25 2016	(r303349)
@@ -2559,7 +2559,8 @@ pci_xhci_dev_intr(struct usb_hci *hci, i
 
 	/* check if device is ready; OS has to initialise it */
 	if (sc->rtsregs.erstba_p == NULL ||
-	    (sc->opregs.usbcmd & XHCI_CMD_RS) == 0)
+	    (sc->opregs.usbcmd & XHCI_CMD_RS) == 0 ||
+	    dev->dev_ctx == NULL)
 		return (0);
 
 	p = XHCI_PORTREG_PTR(sc, hci->hci_port);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607262340.u6QNeQBV019122>