[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v5 19/22] vhost-user: delete chardev on cleanup
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v5 19/22] vhost-user: delete chardev on cleanup |
Date: |
Tue, 31 Jan 2017 22:20:00 +0200 |
From: Marc-André Lureau <address@hidden>
Remove the chardev implicitly when cleaning up the netdev. This
prevents from reusing the chardev since it would be in an incorrect
state with the slave.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1256618
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
net/vhost-user.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/vhost-user.c b/net/vhost-user.c
index b0f0ab6..77b8110 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -151,7 +151,10 @@ static void vhost_user_cleanup(NetClientState *nc)
s->vhost_net = NULL;
}
if (nc->queue_index == 0) {
+ Chardev *chr = qemu_chr_fe_get_driver(&s->chr);
+
qemu_chr_fe_deinit(&s->chr);
+ qemu_chr_delete(chr);
}
qemu_purge_queued_packets(nc);
--
MST
- [Qemu-devel] [PULL v5 09/22] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc(), (continued)
- [Qemu-devel] [PULL v5 09/22] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc(), Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 07/22] ARRAY_SIZE: check that argument is an array, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 11/22] hw/ioh3420: derive from PCI Express Root Port base class, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 10/22] hw/pcie: Introduce a base class for PCI Express Root Ports, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 12/22] hw/pcie: Introduce Generic PCI Express Root Port, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 13/22] hw/i386: check if nvdimm is enabled before plugging, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 14/22] msix: Follow CODING_STYLE, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 15/22] hcd-xhci: check & correct param before using it, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 17/22] virtio: make virtio_should_notify static, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 16/22] pci: Convert msix_init() to Error and fix callers, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 19/22] vhost-user: delete chardev on cleanup,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v5 18/22] vhost: skip ROM sections, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 20/22] hw/pci: disable pci-bridge's shpc by default, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 21/22] arm: better stub version for MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v5 22/22] arm: add trailing ; after MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31