> On 28-Jun-2023, at 11:58 AM, Cédric Le Goater <c...@redhat.com> wrote: > > Hello, > > On 6/26/23 14:30, Michael S. Tsirkin wrote: >> From: Ani Sinha <anisi...@redhat.com> >> An assertion was missing for tap vhost backends that enforces a non-null >> reference from get_vhost_net(). Both vhost-net-user and vhost-net-vdpa >> enforces this. Enforce the same for tap. Unit tests pass with this change. >> Signed-off-by: Ani Sinha <anisi...@redhat.com> >> Message-Id: <20230619041501.111655-1-anisi...@redhat.com> >> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> >> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> >> Reviewed-by: Laurent Vivier <lviv...@redhat.com> >> --- >> hw/net/vhost_net.c | 1 + >> 1 file changed, 1 insertion(+) >> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c >> index c4eecc6f36..6db23ca323 100644 >> --- a/hw/net/vhost_net.c >> +++ b/hw/net/vhost_net.c >> @@ -507,6 +507,7 @@ VHostNetState *get_vhost_net(NetClientState *nc) >> switch (nc->info->type) { >> case NET_CLIENT_DRIVER_TAP: >> vhost_net = tap_get_vhost_net(nc); >> + assert(vhost_net); >> break; >> #ifdef CONFIG_VHOST_NET_USER >> case NET_CLIENT_DRIVER_VHOST_USER: > > A system of mine without vhost_net (old host kernel) is reaching this assert We need to understand why this assertion is being hit. It could be a bug somewhere else. What is the backtrace? What is the repro case? > and works perfectly fine without. Should it be considered as a regression ? > > Thanks, > > C. >
- [PULL 08/53] hw/cxl/events: Add event interrupt support Michael S. Tsirkin
- [PULL 14/53] hw/scsi: Introduce VHOST_SCSI_COMMON symbo... Michael S. Tsirkin
- [PULL 02/53] hw/cxl: QMP based poison injection support Michael S. Tsirkin
- [PULL 17/53] hw/virtio: Introduce VHOST_VSOCK_COMMON sy... Michael S. Tsirkin
- [PULL 06/53] hw/cxl: Move CXLRetCode definition to cxl_... Michael S. Tsirkin
- [PULL 37/53] include/hw/virtio: make some VirtIODevice ... Michael S. Tsirkin
- [PULL 39/53] hw/net/virtio-net: make some VirtIONet con... Michael S. Tsirkin
- [PULL 21/53] hw/virtio: Remove unnecessary 'virtio-acce... Michael S. Tsirkin
- [PULL 52/53] vhost_net: add an assertion for TAP client... Michael S. Tsirkin
- Re: [PULL 52/53] vhost_net: add an assertion for T... Cédric Le Goater
- Re: [PULL 52/53] vhost_net: add an assertion f... Ani Sinha
- Re: [PULL 52/53] vhost_net: add an asserti... Cédric Le Goater
- Re: [PULL 52/53] vhost_net: add an ass... Ani Sinha
- Re: [PULL 52/53] vhost_net: add a... Michael S. Tsirkin
- [PULL 25/53] pci: ROM preallocation for incoming migrat... Michael S. Tsirkin
- [PULL 22/53] hw/virtio: Build various target-agnostic o... Michael S. Tsirkin
- [PULL 15/53] hw/scsi: Rearrange meson.build Michael S. Tsirkin
- [PULL 27/53] vdpa: return errno in vhost_vdpa_get_vring... Michael S. Tsirkin
- [PULL 34/53] vdpa: do not block migration if device has... Michael S. Tsirkin
- [PULL 26/53] virtio-mem: Simplify bitmap handling and v... Michael S. Tsirkin
- [PULL 48/53] vhost-user: fully use new backend/frontend... Michael S. Tsirkin