qemu-patch-raspberry4/hw/virtio
Markus Armbruster 2726dc51e0 hw: Fix error API violation around object_property_set_link()
The Error ** argument must be NULL, &error_abort, &error_fatal, or a
pointer to a variable containing NULL.  Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.

virtio_gpu_pci_base_realize(), virtio_vga_base_realize(),
sparc32_ledma_device_realize(), sparc32_dma_realize(),
sparc32_dma_realize() xilinx_axidma_realize(), mips_cps_realize(),
macio_realize_ide(), xilinx_enet_realize(), and
virtio_iommu_pci_realize() are wrong that way: they reuse the argument
they pass to object_property_set_link() for another call.

Harmless, because object_property_set_link() can't actually fail for
them: it fails when the property doesn't exist, is not settable, or
its .check() method fails.  Fix by passing &error_abort instead.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Cc: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20200630090351.1247703-16-armbru@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2020-07-02 06:25:29 +02:00
..
Kconfig virtio-iommu: depend on PCI 2020-04-01 19:00:16 +02:00
Makefile.objs virtio: add vhost-user-vsock-pci device 2020-06-12 10:17:06 -04:00
trace-events hw/virtio/vhost: re-factor vhost-section and allow DIRTY_MEMORY_CODE 2020-06-08 17:04:19 +01:00
vhost-backend.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00
vhost-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-user-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-fs.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
vhost-user-input-pci.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
vhost-user-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-user-vsock.c virtio: add vhost-user-vsock base device 2020-06-12 10:17:06 -04:00
vhost-user.c Stop vhost-user sending uninitialized mmap_offsets 2020-06-24 17:18:28 -04:00
vhost-vsock-common.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost-vsock-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
vhost-vsock.c vhost-vsock: add vhost-vsock-common abstraction 2020-06-12 10:17:06 -04:00
vhost.c Fix parameter type in vhost migration log path 2020-06-12 10:17:06 -04:00
virtio-9p-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-balloon.c virtio-balloon: Provide an interface for free page reporting 2020-06-09 14:18:04 -04:00
virtio-blk-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-bus.c virtio: notify virtqueue via host notifier when available 2019-11-06 06:35:00 -05:00
virtio-crypto-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-crypto.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-input-host-pci.c Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
virtio-input-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-iommu-pci.c hw: Fix error API violation around object_property_set_link() 2020-07-02 06:25:29 +02:00
virtio-iommu.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-mmio.c qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
virtio-net-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-pci.c virtio-pci: fix queue_enable write 2020-06-12 10:17:06 -04:00
virtio-pci.h virtio-pci: Add Function Level Reset support 2019-09-04 06:33:10 -04:00
virtio-pmem-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-pmem-pci.h virtio-pci: Proxy for virtio-pmem 2019-07-04 17:00:32 -04:00
virtio-pmem.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-rng-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-rng.c qdev: Unrealize must not fail 2020-05-15 07:08:14 +02:00
virtio-scsi-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio-serial-pci.c qdev: Convert uses of qdev_set_parent_bus() with Coccinelle 2020-06-15 22:05:08 +02:00
virtio.c qom: Less verbose object_initialize_child() 2020-06-15 22:05:28 +02:00