qemu-e2k/hw
Zhao Liu 0ea5f594fe block/virtio-blk: Fix missing ERRP_GUARD() for error_prepend()
As the comment in qapi/error, passing @errp to error_prepend() requires
ERRP_GUARD():

* = Why, when and how to use ERRP_GUARD() =
*
* Without ERRP_GUARD(), use of the @errp parameter is restricted:
...
* - It should not be passed to error_prepend(), error_vprepend() or
*   error_append_hint(), because that doesn't work with &error_fatal.
* ERRP_GUARD() lifts these restrictions.
*
* To use ERRP_GUARD(), add it right at the beginning of the function.
* @errp can then be used without worrying about the argument being
* NULL or &error_fatal.

ERRP_GUARD() could avoid the case when @errp is &error_fatal, the user
can't see this additional information, because exit() happens in
error_setg earlier than information is added [1].

The virtio_blk_vq_aio_context_init() passes @errp to error_prepend().

Though its @errp points its caller's local @err variable, to follow the
requirement of @errp, add missing ERRP_GUARD() at the beginning of
virtio_blk_vq_aio_context_init().

[1]: Issue description in the commit message of commit ae7c80a7bd
     ("error: New macro ERRP_GUARD()").

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: "Michael S. Tsirkin" <mst@redhat.com>
Message-ID: <20240311033822.3142585-14-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2024-03-12 11:45:34 +01:00
..
9pfs
acpi hw/arm/virt-acpi-build.c: Migrate SPCR creation to common location 2024-03-08 15:38:46 +10:00
adc
alpha
arm hw/xen: Rename 'ram_memory' global variable as 'xen_memory' 2024-03-09 18:51:45 +01:00
audio
avr
block block/virtio-blk: Fix missing ERRP_GUARD() for error_prepend() 2024-03-12 11:45:34 +01:00
char hw/char/xen_console: Fix missing ERRP_GUARD() for error_prepend() 2024-03-09 18:51:45 +01:00
core hw/core/machine-smp: Calculate total CPUs once in machine_parse_smp_config() 2024-03-09 19:17:01 +01:00
cpu
cris
cxl hw/cxl/cxl-host: Fix missing ERRP_GUARD() in cxl_fixed_memory_window_config() 2024-03-12 11:45:33 +01:00
display hw/display/macfb: Fix missing ERRP_GUARD() in macfb_nubus_realize() 2024-03-12 11:45:33 +01:00
dma hw/dma: Pass parent object to i8257_dma_init() 2024-02-15 16:58:46 +01:00
fsi
gpio hw/gpio: Implement STM32L4x5 GPIO 2024-03-07 12:19:25 +00:00
hppa hw/hppa: do not require CONFIG_USB 2024-02-27 09:37:13 +01:00
hyperv vmbus: Print a warning when enabled without the recommended set of features 2024-03-08 14:18:56 +01:00
i2c hw/i2c: Implement Broadcom Serial Controller (BSC) 2024-03-05 13:22:55 +00:00
i386 hw/i386/pc: Have pc_init_isa() pass a NULL pci_type argument 2024-03-09 18:51:45 +01:00
ide ide, vl: turn -win2k-hack into a property on IDE devices 2024-02-28 00:23:39 +01:00
input hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper 2024-02-22 12:47:35 +01:00
intc hw/intc: Check @errp to handle the error of IOAPICCommonClass.realize() 2024-03-12 11:45:33 +01:00
ipack
ipmi
isa Misc HW patch queue 2024-02-22 15:44:29 +00:00
loongarch loongarch: Change the UEFI loading mode to loongarch 2024-02-29 19:32:45 +08:00
m68k hw/m68k/mcf5208: add support for reset 2024-03-09 19:17:01 +01:00
mem hw/mem/cxl_type3: Fix missing ERRP_GUARD() in ct3_realize() 2024-03-12 11:45:33 +01:00
microblaze
mips mips: do not list individual devices from configs/ 2024-03-08 15:51:22 +01:00
misc hw/misc/xlnx-versal-trng: Check returned bool in trng_prop_fault_event_set() 2024-03-12 11:45:33 +01:00
net hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend() 2024-03-09 18:51:45 +01:00
nios2
nubus hw/nubus: add nubus-virtio-mmio device 2024-02-27 09:36:39 +01:00
nvme hw/nvme: fix invalid endian conversion 2024-02-27 09:37:30 +01:00
nvram hw/sysbus: Inline and remove sysbus_add_io() 2024-02-22 12:47:40 +01:00
openrisc
pci hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen 2024-03-09 18:51:45 +01:00
pci-bridge hw/pci-bridge/cxl_upstream: Fix missing ERRP_GUARD() in cxl_usp_realize() 2024-03-12 11:45:33 +01:00
pci-host hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/ 2024-02-22 12:47:40 +01:00
pcmcia
ppc mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine 2024-03-09 19:17:01 +01:00
rdma
remote hw/remote/remote-obj: hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend() 2024-03-09 18:51:45 +01:00
riscv target/riscv: fix ACPI MCFG table 2024-03-08 21:00:37 +10:00
rtc hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later 2024-03-07 12:54:56 +00:00
rx hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary 2024-02-15 16:58:46 +01:00
s390x
scsi trivial patches for 2024-03-09 2024-03-09 20:12:05 +00:00
sd
sensor
sh4 hw/usb: extract sysbus-ohci to a separate file 2024-02-27 09:37:25 +01:00
smbios hw/smbios: Fix port connector option validation 2024-02-14 06:09:33 -05:00
sparc hw/sparc/leon3: Fix wrong usage of DO_UPCAST macro 2024-02-22 12:47:40 +01:00
sparc64 hw/sparc64/cpu: Initialize GPIO before realizing CPU devices 2024-02-15 16:58:46 +01:00
ssi xlnx-versal-ospi: disable reentrancy detection for iomem_dac 2024-02-27 13:01:41 +00:00
timer misc: pxa2xx_timer: replace qemu_system_reset_request() call with watchdog_perform_action() 2024-02-27 13:01:41 +00:00
tpm hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init 2024-02-29 11:35:36 -10:00
tricore hw/tricore/testboard: Use qdev_new() instead of QOM basic API 2024-02-22 12:47:40 +01:00
ufs
usb hw/usb/bus.c: PCAP adding 0xA in Windows version 2024-03-01 08:27:33 +01:00
vfio hw/vfio/pci.c: Make some structure static 2024-03-09 18:56:36 +03:00
virtio migration: remove error from notifier data 2024-02-28 11:31:28 +08:00
watchdog
xen hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xenpv
xtensa
Kconfig
meson.build