svn commit: r295944 - head/sys/dev/nvme

Jim Harris jimharris at FreeBSD.org
Wed Feb 24 00:01:11 UTC 2016


Author: jimharris
Date: Wed Feb 24 00:01:10 2016
New Revision: 295944
URL: https://svnweb.freebsd.org/changeset/base/295944

Log:
  nvme: fix intx handler to not dereference ioq during initialization
  
  This was a regression from r293328, which deferred allocation
  of the controller's ioq array until after interrupts are enabled
  during boot.
  
  PR:		207432
  Reported and tested by: Andy Carrel <wac at google.com>
  MFC after:	3 days
  Sponsored by:	Intel

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c	Tue Feb 23 23:59:08 2016	(r295943)
+++ head/sys/dev/nvme/nvme_ctrlr.c	Wed Feb 24 00:01:10 2016	(r295944)
@@ -810,7 +810,7 @@ nvme_ctrlr_intx_handler(void *arg)
 
 	nvme_qpair_process_completions(&ctrlr->adminq);
 
-	if (ctrlr->ioq[0].cpl)
+	if (ctrlr->ioq && ctrlr->ioq[0].cpl)
 		nvme_qpair_process_completions(&ctrlr->ioq[0]);
 
 	nvme_mmio_write_4(ctrlr, intmc, 1);


More information about the svn-src-head mailing list