From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs8lw-0002H3-Q9 for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:27:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs8lt-0007Gr-2l for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:27:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs8ls-0007Gf-U4 for qemu-devel@nongnu.org; Fri, 30 Oct 2015 08:27:05 -0400 Date: Fri, 30 Oct 2015 21:26:54 +0900 From: "Daniel P. Berrange" Message-ID: <20151030122654.GO20961@redhat.com> References: <1446203414-4013-1-git-send-email-kraxel@redhat.com> <1446203414-4013-16-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1446203414-4013-16-git-send-email-kraxel@redhat.com> Subject: Re: [Qemu-devel] [PATCH 15/19] vnc: fix local state init Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: pl@kamp.de, qemu-devel@nongnu.org On Fri, Oct 30, 2015 at 12:10:10PM +0100, Gerd Hoffmann wrote: It isn't entirely obvious what bug is being fixed here, perhaps a little more info in the commit message would help. > Signed-off-by: Gerd Hoffmann > --- > ui/vnc-jobs.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/ui/vnc-jobs.c b/ui/vnc-jobs.c > index fd9ed39..12389cc 100644 > --- a/ui/vnc-jobs.c > +++ b/ui/vnc-jobs.c > @@ -185,6 +185,9 @@ void vnc_jobs_consume_buffer(VncState *vs) > */ > static void vnc_async_encoding_start(VncState *orig, VncState *local) > { > + buffer_init(&local->output, "vnc-worker-output"); > + local->csock = -1; /* Don't do any network work on this thread */ > + > local->vnc_encoding = orig->vnc_encoding; > local->features = orig->features; > local->vd = orig->vd; > @@ -196,7 +199,6 @@ static void vnc_async_encoding_start(VncState *orig, VncState *local) > local->zlib = orig->zlib; > local->hextile = orig->hextile; > local->zrle = orig->zrle; > - local->csock = -1; /* Don't do any network work on this thread */ > } > > static void vnc_async_encoding_end(VncState *orig, VncState *local) > @@ -212,12 +214,10 @@ static int vnc_worker_thread_loop(VncJobQueue *queue) > { > VncJob *job; > VncRectEntry *entry, *tmp; > - VncState vs; > + VncState vs = {}; Ok, so we'd not initialized memory in VncState to all zeros before. > int n_rectangles; > int saved_offset; > > - buffer_init(&vs.output, "vnc-worker-output"); > - > vnc_lock_queue(queue); > while (QTAILQ_EMPTY(&queue->jobs) && !queue->exit) { > qemu_cond_wait(&queue->cond, &queue->mutex); Reviewed-by: Daniel P. Berrange > -- > 1.8.3.1 > Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|