svn commit: r257767 - head/usr.sbin/bhyve

Neel Natu neel at FreeBSD.org
Wed Nov 6 22:35:52 UTC 2013


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 at 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:


More information about the svn-src-all mailing list