diff options
author | neel <neel@FreeBSD.org> | 2013-03-16 05:40:29 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-03-16 05:40:29 +0000 |
commit | 6a88d4ed82828037a36d00131be5855807f88829 (patch) | |
tree | 92f183f77f1776849f048a0cb58a31281bee29ce | |
parent | faaba46948fb2a2f0c76f4ef57dc6d7384fd55fe (diff) | |
download | FreeBSD-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
-rw-r--r-- | usr.sbin/bhyve/pci_virtio_net.c | 2 |
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). |