diff --git a/Cargo.lock b/Cargo.lock index b2b8be9301..69027f0399 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1171,6 +1171,7 @@ dependencies = [ "once_cell", "remain", "sync", + "sys_util", "tempfile", "thiserror", "virtio_sys", diff --git a/vhost_user_devices/Cargo.toml b/vhost_user_devices/Cargo.toml index 71d5596c22..0aae93cec5 100644 --- a/vhost_user_devices/Cargo.toml +++ b/vhost_user_devices/Cargo.toml @@ -32,6 +32,7 @@ net_util = { path = "../net_util", optional = true } once_cell = "1.7.2" remain = "*" sync = { path = "../sync" } +sys_util = { path = "../sys_util" } thiserror = "*" virtio_sys = { path = "../virtio_sys", optional = true } vm_memory = { path = "../vm_memory" } diff --git a/vhost_user_devices/src/lib.rs b/vhost_user_devices/src/lib.rs index 40985a8587..13a4a8714b 100644 --- a/vhost_user_devices/src/lib.rs +++ b/vhost_user_devices/src/lib.rs @@ -56,6 +56,7 @@ use cros_async::{AsyncError, AsyncWrapper, Executor}; use devices::virtio::{Queue, SignalableInterrupt}; use remain::sorted; use sync::Mutex; +use sys_util::clear_fd_flags; use thiserror::Error as ThisError; use vm_memory::{GuestAddress, GuestMemory, MemoryRegion}; use vmm_vhost::vhost_user::message::{ @@ -475,6 +476,14 @@ impl VhostUserSlaveReqHandlerMut for DeviceRequestHandler