summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bhyve
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-03-16 05:40:29 +0000
committerneel <neel@FreeBSD.org>2013-03-16 05:40:29 +0000
commit6a88d4ed82828037a36d00131be5855807f88829 (patch)
tree92f183f77f1776849f048a0cb58a31281bee29ce /usr.sbin/bhyve
parentfaaba46948fb2a2f0c76f4ef57dc6d7384fd55fe (diff)
downloadFreeBSD-src-6a88d4ed82828037a36d00131be5855807f88829.zip
FreeBSD-src-6a88d4ed82828037a36d00131be5855807f88829.tar.gz
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
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r--usr.sbin/bhyve/pci_virtio_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c
index 11647d6..7129f6b 100644
--- a/usr.sbin/bhyve/pci_virtio_net.c
+++ b/usr.sbin/bhyve/pci_virtio_net.c
@@ -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).
OpenPOWER on IntegriCloud