From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com
Subject: Re: [Qemu-devel] [PATCHv2] vhost-user: delete chardev on cleanup
Date: Tue, 24 Jan 2017 13:16:48 -0600 [thread overview]
Message-ID: <58a2f89d-c366-ed7b-b1ec-ce259ebbdede@redhat.com> (raw)
In-Reply-To: <20170124190258.14354-1-marcandre.lureau@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On 01/24/2017 01:02 PM, Marc-André Lureau wrote:
> Remove the chardev implicitely when cleaning up the netdev. This
s/implicitely/implicitly/
> prevents from reusing the chardev since it would be in an incorrect
> state with the slave.
>
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1256618
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> net/vhost-user.c | 3 +++
> 1 file changed, 3 insertions(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index 7aff77ee4a..179939f5c1 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_fe_deinit(&s->chr);
> + qemu_chr_delete(chr);
> }
>
> qemu_purge_queued_packets(nc);
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2017-01-24 19:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 19:02 [Qemu-devel] [PATCHv2] vhost-user: delete chardev on cleanup Marc-André Lureau
2017-01-24 19:16 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58a2f89d-c366-ed7b-b1ec-ce259ebbdede@redhat.com \
--to=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).