qemu/hw/net
Zhao Liu 8538ceecd3 hw/net/xen_nic: 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 the pointer of
error_fatal, the user can't see this additional information, because
exit() happens in error_setg earlier than information is added [1].

The xen_netdev_connect() passes @errp to error_prepend(), and its @errp
parameter is from xen_device_frontend_changed().

Though its @errp points to @local_err of xen_device_frontend_changed(),
to follow the requirement of @errp, add missing ERRP_GUARD() at the
beginning of this function.

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

Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240229143914.1977550-3-zhao1.liu@linux.intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-03-09 18:51:45 +01:00
..
can hw/net/can/sja1000: fix bug for single acceptance filter and standard frame 2024-01-05 16:20:15 +01:00
fsl_etsec net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00
rocker net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00
allwinner-sun8i-emac.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
allwinner_emac.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
cadence_gem.c hw/net: cadence_gem: Fix MDIO_OP_xxx values 2024-01-05 22:28:54 +03:00
dp8393x.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
e1000.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
e1000_common.h e1000: Split header files 2023-03-10 15:35:38 +08:00
e1000_regs.h hw/net: spelling fixes 2023-09-20 07:54:34 +03:00
e1000e.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
e1000e_core.c e1000e: rename e1000e_ba_state and e1000e_write_hdr_to_rx_buffers 2023-09-18 14:36:13 +08:00
e1000e_core.h e1000e: Notify only new interrupts 2023-05-23 15:20:15 +08:00
e1000x_common.c e1000x: Take CRC into consideration for size check 2023-05-23 15:20:15 +08:00
e1000x_common.h e1000x: Share more Rx filtering logic 2023-05-23 15:20:15 +08:00
e1000x_regs.h hw/net: spelling fixes 2023-09-20 07:54:34 +03:00
eepro100.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
etraxfs_eth.c hw/net/etraxfs-eth: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
ftgmac100.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
i82596.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
i82596.h hw/net: Make NetCanReceive() return a boolean 2020-03-31 21:14:35 +08:00
igb.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
igb_common.h igb: Add a VF reset handler 2023-11-13 15:33:37 +08:00
igb_core.c igb: Add a VF reset handler 2023-11-13 15:33:37 +08:00
igb_core.h igb: Add a VF reset handler 2023-11-13 15:33:37 +08:00
igb_regs.h hw/net: spelling fixes 2023-09-20 07:54:34 +03:00
igbvf.c igb: Add Function Level Reset to PF and VF 2023-11-13 15:33:37 +08:00
imx_fec.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
Kconfig kconfig: Add PCIe devices to s390x machines 2023-07-14 11:10:57 +02:00
lan9118.c hw/net/lan9118: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
lance.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
lasi_i82596.c hw/net/lasi_i82596: use qemu_create_nic_device() 2024-02-02 16:23:47 +00:00
mcf_fec.c net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00
meson.build target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 18:56:32 +00:00
mipsnet.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
msf2-emac.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
mv88w8618_eth.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
ne2000-isa.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
ne2000-pci.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
ne2000.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
ne2000.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
net_rx_pkt.c igb: Strip the second VLAN tag for extended VLAN 2023-05-23 15:20:15 +08:00
net_rx_pkt.h igb: Strip the second VLAN tag for extended VLAN 2023-05-23 15:20:15 +08:00
net_tx_pkt.c igb: Implement Tx SCTP CSO 2023-05-23 15:20:15 +08:00
net_tx_pkt.h igb: Implement Tx SCTP CSO 2023-05-23 15:20:15 +08:00
npcm7xx_emc.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
npcm_gmac.c hw/net: GMAC Tx Implementation 2024-02-02 13:51:59 +00:00
opencores_eth.c net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00
pcnet-pci.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
pcnet.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
pcnet.h net: Replace TAB indentations with spaces 2022-11-11 09:39:03 +01:00
rtl8139.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
smc91c111.c hw/net/smc91c111: use qemu_configure_nic_device() 2024-02-02 16:23:47 +00:00
spapr_llan.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
stellaris_enet.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
sungem.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
sunhme.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
trace-events hw/net: GMAC Tx Implementation 2024-02-02 13:51:59 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
tulip.c hw/net/tulip: add chip status register values 2024-02-11 13:20:23 +01:00
tulip.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
vhost_net-stub.c virtio-net: add support for configure interrupt 2023-01-08 01:54:22 -05:00
vhost_net.c hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow 2023-10-06 10:56:54 +02:00
virtio-net.c migration: MigrationNotifyFunc 2024-02-28 11:31:28 +08:00
vmware_utils.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
vmxnet3.h hw/net: spelling fixes 2023-09-20 07:54:34 +03:00
vmxnet3_defs.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
vmxnet_debug.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
xen_nic.c hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend() 2024-03-09 18:51:45 +01:00
xgmac.c hw/net: Constify VMState 2023-12-30 07:38:06 +11:00
xilinx_axienet.c net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00
xilinx_ethlite.c net: Provide MemReentrancyGuard * to qemu_new_nic() 2023-11-21 15:42:34 +08:00