From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4zu-0002Nv-O5 for qemu-devel@nongnu.org; Thu, 12 Dec 2013 07:04:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr4zo-0001yS-OF for qemu-devel@nongnu.org; Thu, 12 Dec 2013 07:04:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr4zo-0001xx-Fo for qemu-devel@nongnu.org; Thu, 12 Dec 2013 07:04:00 -0500 From: Markus Armbruster References: <1386834932-2078-1-git-send-email-ghammer@redhat.com> Date: Thu, 12 Dec 2013 13:02:44 +0100 In-Reply-To: <1386834932-2078-1-git-send-email-ghammer@redhat.com> (Gal Hammer's message of "Thu, 12 Dec 2013 09:55:32 +0200") Message-ID: <8761quffa3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3] char: restore read callback on a reattached (hotplug) chardev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gal Hammer Cc: Amit Shah , qemu-devel@nongnu.org, Anthony Liguori Gal Hammer writes: > Fix a bug that was introduced in commit 386a5a1e. A removal of a device > set the chr handlers to NULL. However when the device is plugged back, > its read callback is not restored so data can't be transftered from the > host to the guest (e.g. via the virtio-serial port). > > https://bugzilla.redhat.com/show_bug.cgi?id=1027181 > > Signed-off-by: Gal Hammer > > V3: - fix a typo in comment. > - move the revision history after the "signed-off-by" tag. Close, but no cigar :) It needs to go below the '---' line. > V2: - do not call chr_update_read_handler on device removal. > - add asserts to verify chr_update_read_handler is not called > with an assigned fd_in_tag to prevent fd leaks. > - update fd and udp backends' chr_update_read_handler function > so it won't remove fd_in to prevent a double release. > --- Right here is fine. > qemu-char.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) [...]