net_dim_init_irq_moder() leaves dev->irq_moder dangling when profile allocation fails. virtio-net probe then skips virtqueue teardown if that init fails after init_vqs().
Patch 1 makes the dim init failure path clear irq_moder, so net_dim_free_irq_moder() is a no-op. Patch 2 sends the virtio-net failure through the existing free_irq_moder unwind (reset + del_vqs), matching the page-pool failure path. Patch 2 depends on patch 1. Jianlin Shi (2): dim: clear irq_moder on init failure virtio-net: unwind VQs when irq moderation init fails drivers/net/virtio_net.c | 2 +- lib/dim/net_dim.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- 2.43.0
