[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v4 20/23] vhost-user: delete chardev on cleanup
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v4 20/23] vhost-user: delete chardev on cleanup |
Date: |
Tue, 31 Jan 2017 20:43:52 +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 v4 10/23] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc(), (continued)
- [Qemu-devel] [PULL v4 10/23] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc(), Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 12/23] hw/ioh3420: derive from PCI Express Root Port base class, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 11/23] hw/pcie: Introduce a base class for PCI Express Root Ports, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 13/23] hw/pcie: Introduce Generic PCI Express Root Port, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 14/23] hw/i386: check if nvdimm is enabled before plugging, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 15/23] msix: Follow CODING_STYLE, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 16/23] hcd-xhci: check & correct param before using it, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 18/23] virtio: make virtio_should_notify static, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 19/23] vhost: skip ROM sections, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 17/23] pci: Convert msix_init() to Error and fix callers, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 20/23] vhost-user: delete chardev on cleanup,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v4 21/23] hw/pci: disable pci-bridge's shpc by default, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 22/23] arm: better stub version for MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31
- [Qemu-devel] [PULL v4 23/23] arm: add trailing ; after MISMATCH_CHECK, Michael S. Tsirkin, 2017/01/31
- Re: [Qemu-devel] [PULL v4 00/23] virtio, vhost, pci: fixes, features, Eric Blake, 2017/01/31