net: fix abort and busy loop when the tap device is deleted
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | virtio-net: fix abort in virtio_net_set_queue_pairs() on a deleted taphw/ tests/ | +122 | 0 replies | |
| 2/2 | net/tap: fix busy loop in tap_send() after the tap device is deletednet/ tests/ | +78 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] net: fix abort and busy loop when the tap device is deleted
Management can delete the host tap device of a running VM while QEMU still holds its fds, e.g. OpenStack unplugs the VIF of an instance it is deleting before the domain is gone. QEMU should carry on with a dead link. Instead:
- a multiqueue virtio-net NIC aborts on an assert as soon as the guest changes the number of queue pairs or resets the device (patch 1);
- every tap netdev makes the main loop spin at full CPU in tap_send() (patch 2).
The two patches are independent. Each adds a case to tests/qtest/virtio-net-test.c that fails without its fix. Creating the tap needs CAP_NET_ADMIN, so both cases are skipped when not run as root.
Denis V. Lunev (2):
virtio-net: fix abort in virtio_net_set_queue_pairs() on a deleted tap net/tap: fix busy loop in tap_send() after the tap device is deleted
hw/net/virtio-net.c | 25 +++-- net/tap.c | 8 ++ tests/qtest/virtio-net-test.c | 174 ++++++++++++++++++++++++++++++++++ 3 files changed, 200 insertions(+), 7 deletions(-)
base-commit: 76fdb3373c9a27b3f50ecc9e012cbdeb90af7151
Signature · 1 line
2.53.0