Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2013 22:35:52 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257767 - head/usr.sbin/bhyve
Message-ID:  <201311062235.rA6MZqLV075291@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Wed Nov  6 22:35:52 2013
New Revision: 257767
URL: http://svnweb.freebsd.org/changeset/base/257767

Log:
  Fix an off-by-one error when iterating over the emulated PCI BARs.
  
  Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

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

Modified: head/usr.sbin/bhyve/pci_emul.c
==============================================================================
--- head/usr.sbin/bhyve/pci_emul.c	Wed Nov  6 22:35:23 2013	(r257766)
+++ head/usr.sbin/bhyve/pci_emul.c	Wed Nov  6 22:35:52 2013	(r257767)
@@ -1252,7 +1252,7 @@ pci_emul_cmdwrite(struct pci_devinst *pi
 	 * If the MMIO or I/O address space decoding has changed then
 	 * register/unregister all BARs that decode that address space.
 	 */
-	for (i = 0; i < PCI_BARMAX; i++) {
+	for (i = 0; i <= PCI_BARMAX; i++) {
 		switch (pi->pi_bar[i].type) {
 			case PCIBAR_NONE:
 			case PCIBAR_MEMHI64:



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