From patchwork Tue Feb 23 18:10:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 8395221 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B9116C0553 for ; Tue, 23 Feb 2016 18:12:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDC0020303 for ; Tue, 23 Feb 2016 18:12:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19AE8202EB for ; Tue, 23 Feb 2016 18:12:49 +0000 (UTC) Received: from localhost ([::1]:59053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHS4-0008JL-FR for patchwork-qemu-devel@patchwork.kernel.org; Tue, 23 Feb 2016 13:12:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHQP-0005WU-4f for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:11:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYHQO-0003Es-1l for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:11:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYHQN-0003Ei-SC for qemu-devel@nongnu.org; Tue, 23 Feb 2016 13:11:03 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8C866C00F6E7 for ; Tue, 23 Feb 2016 18:11:03 +0000 (UTC) Received: from localhost (ovpn-113-127.phx2.redhat.com [10.3.113.127]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1NIB2Rj024831; Tue, 23 Feb 2016 13:11:03 -0500 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Tue, 23 Feb 2016 19:10:52 +0100 Message-Id: <1456251053-25960-5-git-send-email-marcandre.lureau@redhat.com> In-Reply-To: <1456251053-25960-1-git-send-email-marcandre.lureau@redhat.com> References: <1456251053-25960-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , jasowang@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH 4/5] qemu-char: remove all msgfds on disconnect X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau Disconnect should reset context. Signed-off-by: Marc-André Lureau --- 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;