qemu/hw/xen
Markus Armbruster de7b18083b hw/xen: Fix xen_bus_realize() error handling
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.

xen_bus_realize() is wrong that way: it passes &local_err to
xs_node_watch() in a loop.  If this fails in more than one iteration,
it can trip error_setv()'s assertion.

Fix by clearing @local_err.

Fixes: c4583c8c39 (xen-bus: reduce scope of backend watch)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20250314143500.2449658-2-armbru@redhat.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2025-03-19 09:36:15 +01:00
..
Kconfig xen: add CONFIG_XEN_BUS and CONFIG_XEN_EMU options for Xen emulation 2023-03-01 08:22:49 +00:00
meson.build hw/arm: xenpvh: Break out a common PVH machine 2024-09-04 16:50:42 +02:00
trace-events hw/xen: Use xs_node_read() from xs_node_vscanf() 2025-01-15 17:07:04 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
xen-backend.c hw/xen: do not repeatedly try to create a failing backend device 2023-11-07 08:54:20 +00:00
xen-bus-helper.c hw/xen: Use xs_node_read() from xs_node_vscanf() 2025-01-15 17:07:04 +00:00
xen-bus.c hw/xen: Fix xen_bus_realize() error handling 2025-03-19 09:36:15 +01:00
xen-host-pci-device.c xen: fix stubdom PCI addr 2024-07-01 14:57:18 +02:00
xen-host-pci-device.h xen: fix stubdom PCI addr 2024-07-01 14:57:18 +02:00
xen-hvm-common.c hw/xen/xen-hvm: Reduce included headers 2025-03-04 14:45:34 +01:00
xen-legacy-backend.c hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE 2025-02-16 14:25:08 +01:00
xen-mapcache.c xen: No need to flush the mapcache for grants 2025-03-10 13:28:03 +01:00
xen-operations.c xen: Drop support for Xen versions below 4.7.1 2023-06-07 15:07:10 +01:00
xen-pvh-common.c hw/xen/xen-pvh: Reduce included headers 2025-03-04 14:45:34 +01:00
xen_devconfig.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
xen_pt.c xen/passthrough: use gsi to map pirq when dom0 is PVH 2025-03-10 13:25:14 +01:00
xen_pt.h hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pt_config_init.c xen/pt: Emulate multifunction bit in header type 2024-03-12 14:13:08 +00:00
xen_pt_graphics.c hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pt_load_rom.c hw/pci: Replace -1 with UINT32_MAX for romsize 2024-07-03 18:14:07 -04:00
xen_pt_msi.c hw/xen: Rename xen_common.h to xen_native.h 2023-03-07 17:04:30 +00:00
xen_pt_stub.c hw/xen: Extract 'xen_igd.h' from 'xen_pt.h' 2024-03-09 18:51:45 +01:00
xen_pvdev.c hw/xen: Prefer QOM cast for XenLegacyDevice 2025-02-16 14:25:08 +01:00