From 22eeb3f80804e321b7fa358ac9e4f5b45727baa4 Mon Sep 17 00:00:00 2001 From: Dylan Reid Date: Fri, 24 Apr 2026 16:54:45 -0700 Subject: [PATCH] virtio-devices: pci: skip activation of invalid queues prepare_activator() called queue.is_valid() and only logged the failure, then still pushed the queue to the activator. This would later panic. Technically this is a fixup for: a10508970 "virtio-devices: Support driver programming fewer queues" But that's been in there since 2021. The intent was to allow a subset of possible queues to be configured, but the invalid queues slipped through too. Signed-off-by: Dylan Reid --- virtio-devices/src/transport/pci_device.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/virtio-devices/src/transport/pci_device.rs b/virtio-devices/src/transport/pci_device.rs index 833836d77..619336e89 100644 --- a/virtio-devices/src/transport/pci_device.rs +++ b/virtio-devices/src/transport/pci_device.rs @@ -807,7 +807,8 @@ impl VirtioPciDevice { } if !queue.is_valid(self.memory.memory().deref()) { - error!("Queue {queue_index} is not valid"); + error!("Queue {queue_index} is not valid; skipping activation"); + continue; } queues.push((