Received: from eggs.gnu.org ([2001:4830:134:3::10]:34443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsYTt-0004HR-Qu for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:58:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsYTs-0008KQ-VL for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:58:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsYTs-0008Jt-Ox for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:58:44 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3839A19CFF0 for ; Fri, 7 Oct 2016 16:58:44 +0000 (UTC) From: Paolo Bonzini Date: Fri, 7 Oct 2016 18:57:47 +0200 Message-Id: <1475859483-32234-24-git-send-email-pbonzini@redhat.com> In-Reply-To: <1475859483-32234-1-git-send-email-pbonzini@redhat.com> References: <1475859483-32234-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 23/39] char: update read handler in all cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau In commit ac1b84dd1 (rhbz#1027181), a check was added to only update the "read handler" when the front-end is opened, because the read callbacks were not restored when a device is plugged. However, this seems not correct, the handler is correctly set back on hotplug (in virtconsole_realize) and the bug can no longer be reproduced. Calling chr_update_read_handler() allows to fix the mux driver to stop calling the child handlers (which may be going to be destroyed). Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20161003094704.18087-2-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 7a85b1f..4b330ea 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -469,7 +469,7 @@ void qemu_chr_add_handlers_full(CharDriverState *s, s->chr_read =3D fd_read; s->chr_event =3D fd_event; s->handler_opaque =3D opaque; - if (fe_open && s->chr_update_read_handler) { + if (s->chr_update_read_handler) { s->chr_update_read_handler(s, context); } =20 --=20 2.7.4