283f0a05e2
QEMU currently crashes when it's started like this: cat << EOF | ./qemu-system-i386 -device vmxnet3 -nodefaults -qtest stdio outl 0xcf8 0x80001014 outl 0xcfc 0xe0001000 outl 0xcf8 0x80001018 outl 0xcf8 0x80001004 outw 0xcfc 0x7 outl 0xcf8 0x80001083 write 0x0 0x1 0xe1 write 0x1 0x1 0xfe write 0x2 0x1 0xbe write 0x3 0x1 0xba writeq 0xe0001020 0xefefff5ecafe0000 writeq 0xe0001020 0xffff5e5ccafe0002 EOF It hits this assertion: qemu-system-i386: ../qemu/hw/net/net_tx_pkt.c:453: net_tx_pkt_reset: Assertion `pkt->raw' failed. This happens because net_tx_pkt_init() is called with max_frags == 0 and thus the allocation p->raw = g_new(struct iovec, max_frags); results in a NULL pointer that causes the assert(pkt->raw); in net_tx_pkt_reset() to fail later. To fix this issue we can check that max_raw_frags was not zero before asserting that pkt->raw is a non-NULL pointer. Buglink: https://bugs.launchpad.net/qemu/+bug/1890157 Message-Id: <20210715193219.1132571-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
can | ||
fsl_etsec | ||
rocker | ||
allwinner_emac.c | ||
allwinner-sun8i-emac.c | ||
cadence_gem.c | ||
dp8393x.c | ||
e1000_regs.h | ||
e1000.c | ||
e1000e_core.c | ||
e1000e_core.h | ||
e1000e.c | ||
e1000x_common.c | ||
e1000x_common.h | ||
eepro100.c | ||
etraxfs_eth.c | ||
ftgmac100.c | ||
i82596.c | ||
i82596.h | ||
imx_fec.c | ||
Kconfig | ||
lan9118.c | ||
lance.c | ||
lasi_i82596.c | ||
mcf_fec.c | ||
meson.build | ||
mipsnet.c | ||
msf2-emac.c | ||
ne2000-isa.c | ||
ne2000-pci.c | ||
ne2000.c | ||
ne2000.h | ||
net_rx_pkt.c | ||
net_rx_pkt.h | ||
net_tx_pkt.c | ||
net_tx_pkt.h | ||
npcm7xx_emc.c | ||
opencores_eth.c | ||
pcnet-pci.c | ||
pcnet.c | ||
pcnet.h | ||
rtl8139.c | ||
smc91c111.c | ||
spapr_llan.c | ||
stellaris_enet.c | ||
sungem.c | ||
sunhme.c | ||
trace-events | ||
trace.h | ||
tulip.c | ||
tulip.h | ||
vhost_net-stub.c | ||
vhost_net.c | ||
virtio-net.c | ||
vmware_utils.h | ||
vmxnet3_defs.h | ||
vmxnet3.c | ||
vmxnet3.h | ||
vmxnet_debug.h | ||
xen_nic.c | ||
xgmac.c | ||
xilinx_axienet.c | ||
xilinx_ethlite.c |