qemu-e2k/hw
Michael S. Tsirkin 6bdc21c050 virtio: fix up max size checks
Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too)
is wrong because elem->out_sg is a pointer.

However, the check is not in the right place and the max_size argument
of virtqueue_map_iovec can be removed.  The check on in_num/out_num
should be moved to qemu_get_virtqueue_element instead, before the call
to virtqueue_alloc_element.

Cc: qemu-stable@nongnu.org
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Fixes: 3724650db0 ("virtio: introduce virtqueue_alloc_element")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-01-19 23:00:31 +02:00
..
9pfs 9pfs: fix P9_NOTAG and P9_NOFID macros 2017-01-03 17:28:44 +01:00
acpi memhp: move DIMM devices into dedicated scope with related common methods 2017-01-10 07:03:24 +02:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
arm fw-cfg: support writeable blobs 2017-01-18 22:59:53 +02:00
audio es1370: wire up reset via DeviceClass 2017-01-11 09:19:03 +01:00
block virtio: convert to use DMA api 2017-01-10 05:56:58 +02:00
bt char: replace avail_connections 2016-10-24 15:46:10 +02:00
char virtio: convert to use DMA api 2017-01-10 05:56:58 +02:00
core fw-cfg: support writeable blobs 2017-01-18 22:59:53 +02:00
cpu
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display virtio-gpu: tag as not hotpluggable 2017-01-11 09:19:05 +01:00
dma hw/dma/pl080: Fix bad bit mask (PL080_CONF_M1 | PL080_CONF_M1) 2016-10-17 19:22:17 +01:00
gpio i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
i2c i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
i386 pc: Add 2.9 machine-types 2017-01-18 22:59:53 +02:00
ide atapi: classify read_cd as conditionally returning data 2016-11-14 11:15:54 -05:00
input gtk,vnc: misc bugfixes. 2017-01-10 14:52:34 +00:00
intc hw/intc/arm_gicv3: Don't signal Pending+Active interrupts to CPU 2016-12-27 14:59:25 +00:00
ipack
ipmi ipmi: fix qemu crash while migrating with ipmi 2016-11-18 17:50:09 +02:00
isa char: remove init callback 2016-10-24 15:27:20 +02:00
lm32 fw-cfg: support writeable blobs 2017-01-18 22:59:53 +02:00
m68k m68k: change default system clock for m5208evb 2016-10-08 11:25:29 +03:00
mem pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
microblaze clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
mips clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
misc i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
moxie
net vhost_net: device IOTLB support 2017-01-18 22:59:53 +02:00
nvram fw-cfg: bump "x-file-slots" to 0x20 for 2.9+ machine types 2017-01-18 22:59:53 +02:00
openrisc
pci pcie_aer: support configurable AER capa version 2017-01-10 07:02:52 +02:00
pci-bridge pcie_aer: support configurable AER capa version 2017-01-10 07:02:52 +02:00
pci-host ppc: Make uninorth interrupt swizzling identical to Grackle 2016-11-23 12:00:48 +11:00
pcmcia
ppc Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
s390x virtio: avoid using guest_notifier_mask in vhost-user mode 2016-12-16 01:14:54 +02:00
scsi virtio: convert to use DMA api 2017-01-10 05:56:58 +02:00
sd vmstateify ssi-sd 2016-09-22 18:13:08 +01:00
sh4 cputlb: drop flush_global flag from tlb_flush 2017-01-13 14:24:37 +00:00
smbios smbios: fix uuid copy 2016-09-29 11:43:22 +08:00
sparc fw_cfg: move FW_CFG_NB_CPUS out of fw_cfg_init1() 2016-11-16 12:09:58 -02:00
sparc64 fw_cfg: move FW_CFG_NB_CPUS out of fw_cfg_init1() 2016-11-16 12:09:58 -02:00
ssi hw/ssi/imx_spi.c: Remove MSGDATA register support 2017-01-09 11:50:23 +00:00
timer i2c: Allow I2C devices to NAK start events 2017-01-09 11:40:20 +00:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore tricore: remove useless cast 2016-09-15 15:32:22 +03:00
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb xen: attach pvusb usb bus to backend qdev 2016-11-22 10:29:41 -08:00
vfio vfio: Add support for mmapping sub-page MMIO BARs 2016-10-31 09:53:04 -06:00
virtio virtio: fix up max size checks 2017-01-19 23:00:31 +02:00
watchdog watchdog: 6300esb: add exit function 2016-12-22 16:00:23 +01:00
xen xen: create qdev for each backend device 2016-11-22 10:29:39 -08:00
xenpv xenpv: Fix qemu_uuid compiling error 2016-09-29 11:43:17 +08:00
xtensa char: remove init callback 2016-10-24 15:27:20 +02:00
Makefile.objs STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00