All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com, Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PULL v2 01/13] ui/vnc: Do not copy z_stream
Date: Wed, 16 Jul 2025 16:49:07 +0100	[thread overview]
Message-ID: <aHfJ84oz0a20vhgo@redhat.com> (raw)
In-Reply-To: <a400f4f4-b811-4043-8dea-4a301567b7fc@tls.msk.ru>

On Wed, Jul 16, 2025 at 06:07:31PM +0300, Michael Tokarev wrote:
> On 15.07.2025 09:32, marcandre.lureau@redhat.com wrote:
> > From: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> > 
> > vnc_worker_thread_loop() copies z_stream stored in its local VncState to
> > the persistent VncState, and the copied one is freed with deflateEnd()
> > later. However, deflateEnd() refuses to operate with a copied z_stream
> > and returns Z_STREAM_ERROR, leaking the allocated memory.
> > 
> > Avoid copying the zlib state to fix the memory leak.
> > 
> > Fixes: bd023f953e5e ("vnc: threaded VNC server")
> > Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > Message-Id: <20250603-zlib-v3-1-20b857bd8d05@rsg.ci.i.u-tokyo.ac.jp>
> > ---
> >   ui/vnc.h          |  2 +-
> >   ui/vnc-enc-zlib.c | 30 +++++++++++++++---------------
> >   ui/vnc.c          | 13 ++++++++++---
> >   3 files changed, 26 insertions(+), 19 deletions(-)
> 
> This looks like a qemu-stable material, is it not?

Yes, please cherry-pick this.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2025-07-16 15:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15  6:32 [PULL v2 00/13] Ui patches marcandre.lureau
2025-07-15  6:32 ` [PULL v2 01/13] ui/vnc: Do not copy z_stream marcandre.lureau
2025-07-16 15:07   ` Michael Tokarev
2025-07-16 15:49     ` Daniel P. Berrangé [this message]
2025-07-15  6:32 ` [PULL v2 02/13] ui/vnc: Introduce the VncWorker type marcandre.lureau
2025-07-15  6:32 ` [PULL v2 03/13] ui/egl-helpers: Error check the fds in egl_dmabuf_export_texture() marcandre.lureau
2025-07-15  6:32 ` [PULL v2 04/13] ui/spice: Enable gl=on option for non-local or remote clients marcandre.lureau
2025-07-15  6:32 ` [PULL v2 05/13] ui/spice: Add an option for users to provide a preferred video codec marcandre.lureau
2025-07-15  6:32 ` [PULL v2 06/13] ui/spice: Add an option to submit gl_draw requests at fixed rate marcandre.lureau
2025-07-15  6:32 ` [PULL v2 07/13] ui/console-gl: Add a helper to create a texture with linear memory layout marcandre.lureau
2025-07-15  6:32 ` [PULL v2 08/13] ui/spice: Create a new texture with linear layout when gl=on is specified marcandre.lureau
2025-07-15  6:32 ` [PULL v2 09/13] ui/spice: Blit the scanout texture if its memory layout is not linear marcandre.lureau
2025-07-17  9:23   ` Peter Maydell
2025-07-17 18:17     ` Kasireddy, Vivek
2025-07-15  6:32 ` [PULL v2 10/13] hw/display: Allow injection of virtio-gpu EDID name marcandre.lureau
2025-07-15  6:32 ` [PULL v2 11/13] ui/gtk: Add keep-aspect-ratio option marcandre.lureau
2025-07-15  6:32 ` [PULL v2 12/13] ui/gtk: Add scale option marcandre.lureau
2025-07-15  6:32 ` [PULL v2 13/13] tpm: "qemu -tpmdev help" should return success marcandre.lureau
2025-07-15  6:38 ` [PULL v2 00/13] Ui patches Marc-André Lureau
2025-07-16 12:40 ` Stefan Hajnoczi

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=aHfJ84oz0a20vhgo@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.