[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 58/59] vring: Better error handling if num is too lar
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 58/59] vring: Better error handling if num is too large |
Date: |
Fri, 19 Sep 2014 15:42:17 +0100 |
From: Fam Zheng <address@hidden>
To be more consistent inside this function.
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
---
hw/virtio/dataplane/vring.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c
index 67cb2b8..372706a 100644
--- a/hw/virtio/dataplane/vring.c
+++ b/hw/virtio/dataplane/vring.c
@@ -181,7 +181,8 @@ static int get_desc(Vring *vring, VirtQueueElement *elem,
/* Stop for now if there are not enough iovecs available. */
if (*num >= VIRTQUEUE_MAX_SIZE) {
- return -ENOBUFS;
+ error_report("Invalid SG num: %u", *num);
+ return -EFAULT;
}
/* TODO handle non-contiguous memory across region boundaries */
--
1.9.3
- [Qemu-devel] [PULL 48/59] ahci: add test_pci_enable to ahci-test., (continued)
- [Qemu-devel] [PULL 48/59] ahci: add test_pci_enable to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 49/59] ahci: properly shadow the TFD register, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 50/59] ahci: Add test_hba_spec to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 51/59] ahci: Add test_hba_enable to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 52/59] ahci: Add test_identify case to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 54/59] block: delete cow block driver, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 55/59] block: vhdx - fix reading beyond pointer during image creation, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 56/59] async: aio_context_new(): Handle event_notifier_init failure, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 57/59] virtio: Import virtio_vring.h, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 53/59] block/archipelago: Fix typo in qemu_archipelago_truncate(), Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 58/59] vring: Better error handling if num is too large,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 59/59] block: Always compile virtio-blk dataplane, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 41/59] qapi/block-core: Add "new" qcow2 options, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 40/59] qcow2: Add overlap-check.template option, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 42/59] docs: List all image elements currently supported by the fuzzer, Stefan Hajnoczi, 2014/09/19
- Re: [Qemu-devel] [PULL 00/59] Block patches, Peter Maydell, 2014/09/19