From ea89813fdf578dca2575d6b814c13ae2ee805e9e Mon Sep 17 00:00:00 2001 From: Brian Foley Date: Mon, 24 Sep 2012 14:33:41 +0100 Subject: [PATCH] --- yaml --- r: 331411 b: refs/heads/master c: 3850d29fc40f3494a3e9c3aac45b6afe53526449 h: refs/heads/master i: 331409: 9f9a41fb690ddeedf80a52a8d08e013e08748ce4 331407: 6d730d526dd9176385707d07b8b432d2ef990d03 v: v3 --- [refs] | 2 +- trunk/drivers/virtio/virtio_mmio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8afc7383bc90..d2a438d19500 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74a74b376c997645b32a4fdf8e76705a00ae097a +refs/heads/master: 3850d29fc40f3494a3e9c3aac45b6afe53526449 diff --git a/trunk/drivers/virtio/virtio_mmio.c b/trunk/drivers/virtio/virtio_mmio.c index 5d7fee385b70..09edeecd42a5 100644 --- a/trunk/drivers/virtio/virtio_mmio.c +++ b/trunk/drivers/virtio/virtio_mmio.c @@ -334,8 +334,8 @@ static struct virtqueue *vm_setup_vq(struct virtio_device *vdev, unsigned index, while (1) { size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN)); - /* Already smallest possible allocation? */ - if (size <= VIRTIO_MMIO_VRING_ALIGN * 2) { + /* Did the last iter shrink the queue below minimum size? */ + if (size < VIRTIO_MMIO_VRING_ALIGN * 2) { err = -ENOMEM; goto error_alloc_pages; }