[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 58/59] vring: Better error handling if num is too
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v2 58/59] vring: Better error handling if num is too large |
Date: |
Mon, 22 Sep 2014 12:42:29 +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
Signed-off-by: Stefan Hajnoczi <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 v2 48/59] ahci: add test_pci_enable to ahci-test., (continued)
- [Qemu-devel] [PULL v2 48/59] ahci: add test_pci_enable to ahci-test., Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 50/59] ahci: Add test_hba_spec to ahci-test., Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 49/59] ahci: properly shadow the TFD register, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 51/59] ahci: Add test_hba_enable to ahci-test., Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 52/59] ahci: Add test_identify case to ahci-test., Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 54/59] block: delete cow block driver, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 55/59] block: vhdx - fix reading beyond pointer during image creation, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 53/59] block/archipelago: Fix typo in qemu_archipelago_truncate(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 56/59] async: aio_context_new(): Handle event_notifier_init failure, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 57/59] virtio: Import virtio_vring.h, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 58/59] vring: Better error handling if num is too large,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL v2 59/59] block: Always compile virtio-blk dataplane, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 32/59] qcow2: Add qcow2_signal_corruption(), Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 34/59] qcow2: Check L1/L2/reftable entries for alignment, Stefan Hajnoczi, 2014/09/22
- [Qemu-devel] [PULL v2 33/59] qcow2: Use qcow2_signal_corruption() for overlaps, Stefan Hajnoczi, 2014/09/22
- Re: [Qemu-devel] [PULL v2 00/59] Block patches, Peter Maydell, 2014/09/23