qemu-e2k/hw/net
Ani Sinha ca3fcdeeee net/vhost-net: do not assert on null pointer return from tap_get_vhost_net()
When 'vhost=off' or no vhost specific options at all are passed for the tap
net-device backend, tap_get_vhost_net() can return NULL. The function
net_init_tap_one() does not call vhost_net_init() on such cases and therefore
vhost_net pointer within the tap device state structure remains NULL. Hence,
assertion here on a NULL pointer return from tap_get_vhost_net() would not be
correct. Remove it and fix the crash generated by qemu upon initialization in
the following call chain :

qdev_realize() -> pci_qdev_realize() -> virtio_device_realize() ->
virtio_bus_device_plugged() -> virtio_net_get_features() -> get_vhost_net()

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Fixes: 0e994668d0 ("vhost_net: add an assertion for TAP client backends")
Reported-by: Cédric Le Goater <clg@redhat.com>
Report: <abab7a71-216d-b103-fa47-70bdf9dc0080@redhat.com>
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20230628112804.36676-1-anisinha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-06-28 07:53:14 -04:00
..
can meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
fsl_etsec
rocker
allwinner_emac.c
allwinner-sun8i-emac.c hw/net/allwinner-sun8i-emac: Correctly byteswap descriptor fields 2023-05-02 15:47:41 +01:00
cadence_gem.c
dp8393x.c hw/net/dp8393x.c: move TYPE_DP8393X and dp8393xState into dp8393x.h 2023-06-22 09:25:40 +02:00
e1000_common.h
e1000_regs.h
e1000.c e1000x: Share more Rx filtering logic 2023-05-23 15:20:15 +08:00
e1000e_core.c e1000e: Notify only new interrupts 2023-05-23 15:20:15 +08:00
e1000e_core.h e1000e: Notify only new interrupts 2023-05-23 15:20:15 +08:00
e1000e.c
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 e1000x: Rename TcpIpv6 into TcpIpv6Ex 2023-05-23 15:20:15 +08:00
eepro100.c
etraxfs_eth.c
ftgmac100.c
i82596.c
i82596.h
igb_common.h igb: Implement Rx PTP2 timestamp 2023-05-23 15:20:15 +08:00
igb_core.c igb: Clear-on-read ICR when ICR.INTA is set 2023-05-23 15:20:15 +08:00
igb_core.h igb: implement VFRE and VFTE registers 2023-03-28 13:10:55 +08:00
igb_regs.h igb: Implement Tx timestamp 2023-05-23 15:20:15 +08:00
igb.c igb: Share common VF constants 2023-05-23 15:20:15 +08:00
igbvf.c igb: Share common VF constants 2023-05-23 15:20:15 +08:00
imx_fec.c hw/net/imx_fec: Support two Ethernet interfaces connected to single MDIO bus 2023-04-20 10:25:43 +01:00
Kconfig vmxnet3: Do not depend on PC 2023-05-23 15:20:15 +08:00
lan9118.c
lance.c
lasi_i82596.c
mcf_fec.c
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mipsnet.c
msf2-emac.c hw/net/msf2-emac: Don't modify descriptor in-place in emac_store_desc() 2023-05-02 15:47:40 +01:00
mv88w8618_eth.c
ne2000-isa.c
ne2000-pci.c
ne2000.c
ne2000.h
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: npcm7xx_emc: set MAC in register space 2023-05-02 15:47:39 +01:00
opencores_eth.c
pcnet-pci.c
pcnet.c
pcnet.h
rtl8139.c rtl8139: fix large_send_mss divide-by-zero 2023-05-23 15:20:15 +08:00
smc91c111.c
spapr_llan.c
stellaris_enet.c
sungem.c
sunhme.c
trace-events igb: Notify only new interrupts 2023-05-23 15:20:15 +08:00
trace.h
tulip.c
tulip.h
vhost_net-stub.c
vhost_net.c net/vhost-net: do not assert on null pointer return from tap_get_vhost_net() 2023-06-28 07:53:14 -04:00
virtio-net.c vhost-user: fully use new backend/frontend naming 2023-06-26 09:50:00 -04:00
vmware_utils.h
vmxnet3_defs.h
vmxnet3.c vmxnet3: Reset packet state after emptying Tx queue 2023-05-23 15:20:15 +08:00
vmxnet3.h
vmxnet_debug.h
xen_nic.c
xgmac.c
xilinx_axienet.c
xilinx_ethlite.c hw/net: Move xilinx_ethlite.c to the target-independent source set 2023-05-16 09:14:18 +02:00