diff --git a/0011-virtio-net-do-not-delete-fd-which-has-not-been-added.patch b/0011-virtio-net-do-not-delete-fd-which-has-not-been-added.patch new file mode 100644 index 0000000000000000000000000000000000000000..a9572124ff8bd78dfda3cd680904f6ccbb8e94ac --- /dev/null +++ b/0011-virtio-net-do-not-delete-fd-which-has-not-been-added.patch @@ -0,0 +1,18 @@ +diff --git a/virtio/src/device/net.rs b/virtio/src/device/net.rs +index 4e605fa..84e5ce6 100644 +--- a/virtio/src/device/net.rs ++++ b/virtio/src/device/net.rs +@@ -977,11 +977,11 @@ impl NetIoHandler { + let mut notifiers_fds = vec![ + locked_net_io.update_evt.as_raw_fd(), + locked_net_io.rx.queue_evt.as_raw_fd(), +- locked_net_io.rx.recv_evt.as_raw_fd(), + locked_net_io.tx.queue_evt.as_raw_fd(), + ]; + if old_tap_fd != -1 { + notifiers_fds.push(old_tap_fd); ++ notifiers_fds.push(locked_net_io.rx.recv_evt.as_raw_fd()); + } + let mut notifiers = gen_delete_notifiers(¬ifiers_fds); + drop(locked_net_io); + diff --git a/stratovirt.spec b/stratovirt.spec index 9465ff18613ca91db0482b80e158c013603db8c7..27361b18c6ef01198d91e9e69d2755e5b40fd4b3 100644 --- a/stratovirt.spec +++ b/stratovirt.spec @@ -6,7 +6,7 @@ Name: stratovirt Version: 2.4.0 -Release: 9 +Release: 10 Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization. License: MulanPSL-2.0 @@ -27,6 +27,7 @@ Patch007:0007-vfio-pci-fix-a-deadlock-problem.patch Patch008:0008-QMP-bugfix-the-error-in-the-return-result-of-query_c.patch Patch009:0009-QMP-add-query-cpus-fast.patch Patch010:0010-add-support-to-interconnecting-with-libvirt.patch +Patch011:0011-virtio-net-do-not-delete-fd-which-has-not-been-added.patch ExclusiveArch: x86_64 aarch64 riscv64 @@ -132,6 +133,9 @@ install -D -m555 ./target/%{rust_musl_target}/release/stratovirt %{buildroot}%{_ %endif %changelog +* Thu Jun 19 2025 Yan Wang 2.4.0-10 +- Do not delete fd which has not been added + * Fri May 23 2025 Ming Yang 2.4.0-9 - add support to interconnect with libvirt