From e0125653b1943f1493b9f608d9a6ef1c5d1f5eb8 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Fri, 14 Apr 2023 15:41:40 -0700 Subject: [PATCH] Revert "vmm: config: Don't close reserved FDs from `NetConfig::drop()`" This reverts commit 0110fb4edc9ffa13d33f1c41c708f4bd844b0aee. Signed-off-by: Bo Chen --- vmm/src/config.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vmm/src/config.rs b/vmm/src/config.rs index cb9a389e0..7c1937b3d 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -1154,11 +1154,6 @@ impl Drop for NetConfig { fn drop(&mut self) { if let Some(mut fds) = self.fds.take() { for fd in fds.drain(..) { - // Skip reserved FDs - if fd <= 2 { - continue; - } - // SAFETY: Safe as the fd was given to the config by the API unsafe { libc::close(fd) }; }