All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/4] migration: Don't leak IO channels
Date: Thu, 18 Jan 2018 13:44:53 +0000	[thread overview]
Message-ID: <20180118134453.GA16350@redhat.com> (raw)
In-Reply-To: <20171101142526.1006-2-ross.lagerwall@citrix.com>

On Wed, Nov 01, 2017 at 02:25:23PM +0000, Ross Lagerwall wrote:
> Since qemu_fopen_channel_{in,out}put take references on the underlying
> IO channels, make sure to release our references to them.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
> New in v2.
> 
>  migration/savevm.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>


> 
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 4a88228..87557dd 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -2259,6 +2259,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)
>      }
>      qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-save-state");
>      f = qemu_fopen_channel_output(QIO_CHANNEL(ioc));
> +    object_unref(OBJECT(ioc));
>      ret = qemu_save_device_state(f);
>      qemu_fclose(f);
>      if (ret < 0) {
> @@ -2292,6 +2293,7 @@ void qmp_xen_load_devices_state(const char *filename, Error **errp)
>      }
>      qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-load-state");
>      f = qemu_fopen_channel_input(QIO_CHANNEL(ioc));
> +    object_unref(OBJECT(ioc));
>  
>      ret = qemu_loadvm_state(f);
>      qemu_fclose(f);
> -- 
> 2.9.5
> 
> 

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

  parent reply	other threads:[~2018-01-18 13:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 14:25 [Qemu-devel] [PATCH v2 0/4] QIOChannelFile bug fixes Ross Lagerwall
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 1/4] migration: Don't leak IO channels Ross Lagerwall
2018-01-18 13:41   ` Ross Lagerwall
2018-01-18 13:44   ` Daniel P. Berrange [this message]
2018-02-06 11:17   ` Dr. David Alan Gilbert
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 2/4] io: Fix QIOChannelFile when creating and opening read-write Ross Lagerwall
2018-01-18 13:49   ` Daniel P. Berrange
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 3/4] io: Don't call close multiple times in QIOChannelFile Ross Lagerwall
2017-11-01 18:11   ` Marc-André Lureau
2018-01-18 13:50   ` Daniel P. Berrange
2017-11-01 14:25 ` [Qemu-devel] [PATCH v2 4/4] io: Add /dev/fdset/ support to QIOChannelFile Ross Lagerwall
2017-11-01 18:12   ` Marc-André Lureau
2018-01-18 13:50   ` Daniel P. Berrange
2018-01-18 13:40 ` [Qemu-devel] [PATCH v2 0/4] QIOChannelFile bug fixes Ross Lagerwall
2018-01-18 13:47   ` Daniel P. Berrange
2018-01-18 13:51 ` Daniel P. Berrange

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=20180118134453.GA16350@redhat.com \
    --to=berrange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=ross.lagerwall@citrix.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.