qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	jasowang@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH 4/5] qemu-char: remove all msgfds on disconnect
Date: Tue, 23 Feb 2016 19:10:52 +0100	[thread overview]
Message-ID: <1456251053-25960-5-git-send-email-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <1456251053-25960-1-git-send-email-marcandre.lureau@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Disconnect should reset context.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 qemu-char.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-char.c b/qemu-char.c
index 24e326a..dc433a6 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2774,6 +2774,7 @@ static void tcp_chr_disconnect(CharDriverState *chr)
         s->listen_tag = qio_channel_add_watch(
             QIO_CHANNEL(s->listen_ioc), G_IO_IN, tcp_chr_accept, chr, NULL);
     }
+    tcp_set_msgfds(chr, NULL, 0);
     remove_fd_in_watch(chr);
     object_unref(OBJECT(s->sioc));
     s->sioc = NULL;
-- 
2.5.0

  parent reply	other threads:[~2016-02-23 18:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 18:10 [Qemu-devel] [PATCH 0/5] vhost-user: fixes from reconnect RFC marcandre.lureau
2016-02-23 18:10 ` [Qemu-devel] [PATCH 1/5] vhost-user: fix use after free marcandre.lureau
2016-02-23 18:10 ` [Qemu-devel] [PATCH 2/5] vhost-user: remove useless is_server field marcandre.lureau
2016-02-23 18:10 ` [Qemu-devel] [PATCH 3/5] qemu-char: avoid potential double-free marcandre.lureau
2016-02-23 18:10 ` marcandre.lureau [this message]
2016-02-23 18:10 ` [Qemu-devel] [PATCH 5/5] qemu-char: make tcp_chr_disconnect() reentrant-safe marcandre.lureau

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=1456251053-25960-5-git-send-email-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=jasowang@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).