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

Neel Natu neel at FreeBSD.org
Sat Mar 16 05:40:30 UTC 2013


Author: neel
Date: Sat Mar 16 05:40:29 2013
New Revision: 248368
URL: http://svnweb.freebsd.org/changeset/base/248368

Log:
  Change the type of 'ndesc' from 'int' to 'uint16_t' so that descriptor index
  wraparound is handled correctly.
  
  The gory details are available here:
  http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-March/001119.html
  
  This fixes a regression introduced in r247871.
  
  Pointed out by:	Bruce Evans, Chris Torek

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

Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c	Sat Mar 16 04:08:01 2013	(r248367)
+++ head/usr.sbin/bhyve/pci_virtio_net.c	Sat Mar 16 05:40:29 2013	(r248368)
@@ -170,7 +170,7 @@ pci_vtnet_iosize(struct pci_devinst *pi)
 static int
 hq_num_avail(struct vring_hqueue *hq)
 {
-	int ndesc;
+	uint16_t ndesc;
 
 	/*
 	 * We're just computing (a-b) in GF(216).


More information about the svn-src-all mailing list