[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL v3 18/21] vhost-user: delete chardev on cleanup

From: Michael S. Tsirkin
Subject: [Qemu-devel] [PULL v3 18/21] vhost-user: delete chardev on cleanup
Date: Tue, 31 Jan 2017 15:15:08 +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 7aff77e..179939f 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) {
+        CharDriverState *chr = qemu_chr_fe_get_driver(&s->chr);
+        qemu_chr_delete(chr);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]