qemu/hw
Stefan Hajnoczi 745a9bb9cd dataplane: fix virtio_blk_data_plane_create() op blocker error path
Commit 3718d8ab65 ("block: Replace in_use
with operation blocker") broke the error path because it consumed
local_err instead of propagating it.

The caller has no way to know that the function failed.  This caused
virtio-blk to start "successfully" even though there was a fatal
dataplane error.

Steps to reproduce:

  $ qemu-system-x86_64 -enable-kvm -object iothread,id=iothread0 \
                       -drive if=none,id=drive0,file=a.img \
  (qemu) drive_mirror drive0 /tmp/foo.img
  (qemu) device_add virtio-blk-pci,iothread=iothread0,drive=drive0

Expected result:

  Since the mirror block job is using drive0 it is not possible to start
  virtio-blk data-plane.

  device_add fails and the PCI adapter is not added.

Actual result:

  device_add completes and the PCI adapter is added.

Cc: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-09-11 16:21:46 +02:00
..
9pfs hw/9pfs: Don't return type from host in readdir on local 9p filesystem 2014-09-04 10:51:13 -05:00
acpi pcihp: fix possible array out of bounds 2014-08-25 00:16:06 +02:00
alpha iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps 2014-08-28 23:10:22 +02:00
arm aarch64: raise max_cpus to 8 2014-08-29 15:00:29 +01:00
audio SCSI changes that enable sending vendor-specific commands via virtio-scsi. 2014-08-19 13:00:57 +01:00
block dataplane: fix virtio_blk_data_plane_create() op blocker error path 2014-09-11 16:21:46 +02:00
bt l2cap: fix access to freed memory 2014-08-15 19:12:48 +04:00
char SCSI changes that enable sending vendor-specific commands via virtio-scsi. 2014-08-19 13:00:57 +01:00
core Patch queue for ppc - 2014-09-08 2014-09-08 12:02:07 +01:00
cpu icc_bus: QOM'ify ICC 2013-12-24 18:02:18 +01:00
cris machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
display vbe: rework sanity checks 2014-09-04 08:23:14 +02:00
dma dma: axidma: Variablise repeated s->streams[i] sub-expr 2014-08-24 13:16:32 +04:00
gpio savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
i2c Fix debug print warning 2014-09-02 22:38:16 +04:00
i386 trivial patches for 2014-09-03 2014-09-04 13:33:53 +01:00
ide block: Make the block accounting functions operate on BlockAcctStats 2014-09-10 10:41:29 +02:00
input Fix debug print warning 2014-09-02 22:38:16 +04:00
intc Fix debug print warning 2014-09-02 22:38:16 +04:00
ipack memory: remove memory_region_destroy 2014-08-18 12:06:21 +02:00
isa Fix debug print warning 2014-09-02 22:38:16 +04:00
lm32 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
m68k machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
mem pc-dimm: fix up error message 2014-08-14 13:22:00 +02:00
microblaze microblaze: ml605: Get rid of ddr_base variable 2014-08-24 13:16:32 +04:00
mips memory: convert memory_region_destroy to object_unparent 2014-08-18 12:06:20 +02:00
misc PPC: Cuda: Use cuda timer to expose tbfreq to guest 2014-09-08 12:50:52 +02:00
moxie hw/moxie/moxiesim.c: Remove unused moxie_intc_create() 2014-06-24 20:01:24 +04:00
net Patch queue for ppc - 2014-09-08 2014-09-08 12:02:07 +01:00
nvram PPC: mac_nvram: Split NVRAM into OF and OSX parts 2014-09-08 12:50:52 +02:00
openrisc machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
pci pci: avoid losing config updates to MSI/MSIX cap regs 2014-09-02 17:28:26 +03:00
pci-bridge ioh3420: remove unused ioh3420_init() declaration 2014-09-02 17:28:26 +03:00
pci-host apb: implement PCI bus error interrupt map registers 2014-09-09 06:07:12 +01:00
pcmcia hw: Fix qemu_allocate_irqs() leaks 2014-06-30 21:13:30 +02:00
ppc Patch queue for ppc - 2014-09-08 2014-09-08 12:02:07 +01:00
s390x sclp-s390: Add memory hotplug SCLPs 2014-09-01 09:25:32 +02:00
scsi block: Make the block accounting functions operate on BlockAcctStats 2014-09-10 10:41:29 +02:00
sd sd: sdhci: Fix ADMA dma_memory_read access 2014-08-04 14:41:54 +01:00
sh4 hw: Fix qemu_allocate_irqs() leaks 2014-06-30 21:13:30 +02:00
sparc tcx: move initialisation from realizefn to initfn 2014-06-05 20:51:57 +01:00
sparc64 sun4u: switch second PCI-ebus bridge BAR over to PCI IO space 2014-08-17 13:12:52 +01:00
ssi ssi: xilinx_spi: Initialise CS GPIOs as NULL 2014-08-15 18:54:40 +04:00
timer Fix debug print warning 2014-09-02 22:38:16 +04:00
tpm Add ACPI tables for TPM 2014-08-25 00:16:06 +02:00
tricore target-tricore: Add board for systemmode 2014-09-01 14:49:20 +01:00
unicore32 machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
usb usb: add usb host adapters exit trace 2014-08-29 12:52:14 +02:00
virtio Net patches 2014-09-04 17:39:07 +01:00
watchdog memory: remove memory_region_destroy 2014-08-18 12:06:21 +02:00
xen memory: remove memory_region_destroy 2014-08-18 12:06:21 +02:00
xenpv machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
xtensa hw/xtensa/xtfpga: implement initrd loading 2014-06-29 02:32:42 +04:00
Makefile.objs pc: implement pc-dimm device abstraction 2014-06-19 16:41:47 +03:00