virtio-devices: Remove panic when duplicating activate EventFds

Replace the (unlikely) panic when duplicating the EventFds with a
propagated error.

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-06-01 12:57:22 +01:00
parent 2bcacbe19d
commit 3a1cf6e740
18 changed files with 35 additions and 32 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ impl VirtioDevice for Rng {
device_status,
} = context;
self.common.activate(&queues, interrupt_cb.clone())?;
let (kill_evt, pause_evt) = self.common.dup_eventfds();
let (kill_evt, pause_evt) = self.common.dup_eventfds()?;
if let Some(file) = self.random_file.as_ref() {
let random_file = file.try_clone().map_err(|e| {