qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: pl@kamp.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 15/19] vnc: fix local state init
Date: Fri, 30 Oct 2015 21:26:54 +0900	[thread overview]
Message-ID: <20151030122654.GO20961@redhat.com> (raw)
In-Reply-To: <1446203414-4013-16-git-send-email-kraxel@redhat.com>

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 <kraxel@redhat.com>
> ---
>  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 <berrange@redhat.com>

> -- 
> 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 :|

  reply	other threads:[~2015-10-30 12:27 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 11:09 [Qemu-devel] [PATCH 00/19] buffer/vnc: improve vnc buffer hsndling Gerd Hoffmann
2015-10-30 11:09 ` [Qemu-devel] [PATCH 01/19] buffer: make the Buffer capacity increase in powers of two Gerd Hoffmann
2015-10-30 12:06   ` Daniel P. Berrange
2015-10-30 11:09 ` [Qemu-devel] [PATCH 02/19] buffer: add buffer_init Gerd Hoffmann
2015-10-30 12:07   ` Daniel P. Berrange
2015-10-30 11:09 ` [Qemu-devel] [PATCH 03/19] buffer: add buffer_move_empty Gerd Hoffmann
2015-10-30 12:11   ` Daniel P. Berrange
2015-10-30 12:34     ` Daniel P. Berrange
2015-10-30 11:09 ` [Qemu-devel] [PATCH 04/19] buffer: add buffer_move Gerd Hoffmann
2015-10-30 12:12   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 05/19] buffer: add buffer_shrink Gerd Hoffmann
2015-10-30 12:13   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 06/19] buffer: add tracing Gerd Hoffmann
2015-10-30 12:14   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 07/19] vnc: attach names to buffers Gerd Hoffmann
2015-10-30 12:15   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 08/19] vnc: kill jobs queue buffer Gerd Hoffmann
2015-10-30 12:16   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 09/19] vnc-jobs: move buffer reset, use new buffer move Gerd Hoffmann
2015-10-30 12:17   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 10/19] vnc: zap dead code Gerd Hoffmann
2015-10-30 12:18   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 11/19] vnc: add vnc_width+vnc_height helpers Gerd Hoffmann
2015-10-30 12:19   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 12/19] vnc: factor out vnc_update_server_surface Gerd Hoffmann
2015-10-30 12:22   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 13/19] vnc: use vnc_{width, height} in vnc_set_area_dirty Gerd Hoffmann
2015-10-30 12:23   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 14/19] vnc: only alloc server surface with clients connected Gerd Hoffmann
2015-10-30 12:24   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 15/19] vnc: fix local state init Gerd Hoffmann
2015-10-30 12:26   ` Daniel P. Berrange [this message]
2015-10-30 11:10 ` [Qemu-devel] [PATCH 16/19] vnc: recycle empty vs->output buffer Gerd Hoffmann
2015-10-30 12:27   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 17/19] buffer: factor out buffer_req_size Gerd Hoffmann
2015-10-30 12:28   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 18/19] buffer: factor out buffer_adj_size Gerd Hoffmann
2015-10-30 12:29   ` Daniel P. Berrange
2015-10-30 11:10 ` [Qemu-devel] [PATCH 19/19] buffer: allow a buffer to shrink gracefully Gerd Hoffmann
2015-10-30 12:33   ` Daniel P. Berrange
2015-11-03  7:10   ` Peter Lieven
2015-10-30 12:36 ` [Qemu-devel] [PATCH 00/19] buffer/vnc: improve vnc buffer hsndling Daniel P. Berrange
2015-11-03  7:13 ` Peter Lieven
2015-11-03  8:23   ` Gerd Hoffmann
2015-11-03  9:01     ` Peter Lieven

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=20151030122654.GO20961@redhat.com \
    --to=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pl@kamp.de \
    --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).