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 <dgreid@fb.com>
This commit is contained in:
Dylan Reid
2026-04-24 16:54:45 -07:00
committed by Rob Bradford
parent feddff025a
commit 22eeb3f808

View File

@@ -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((