qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Chuan Zheng <zhengchuan@huawei.com>
Cc: yubihong@huawei.com, zhang.zhanghailiang@huawei.com,
	quintela@redhat.com, qemu-devel@nongnu.org,
	xiexiangyou@huawei.com, dgilbert@redhat.com,
	alex.chen@huawei.com, wanghao232@huawei.com
Subject: Re: [PATCH v2] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration
Date: Wed, 11 Nov 2020 15:51:01 +0000	[thread overview]
Message-ID: <20201111155101.GH906488@redhat.com> (raw)
In-Reply-To: <1605104763-118687-1-git-send-email-zhengchuan@huawei.com>

Note to migration maintainers - this is desirable for 5.2

On Wed, Nov 11, 2020 at 10:26:03PM +0800, Chuan Zheng wrote:
> When creating new tls client, the tioc->master will be referenced which results in socket
> leaking after multifd_save_cleanup if we cancel migration.
> Fix it by do object_unref() after tls client creation.
> 
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
> ---
>  migration/multifd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/migration/multifd.c b/migration/multifd.c
> index 68b171f..6992761 100644
> --- a/migration/multifd.c
> +++ b/migration/multifd.c
> @@ -752,6 +752,7 @@ static void multifd_tls_channel_connect(MultiFDSendParams *p,
>          return;
>      }
>  
> +    object_unref(OBJECT(ioc));
>      trace_multifd_tls_outgoing_handshake_start(ioc, tioc, hostname);
>      qio_channel_set_name(QIO_CHANNEL(tioc), "multifd-tls-outgoing");
>      qio_channel_tls_handshake(tioc,

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


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:[~2020-11-11 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 14:26 [PATCH v2] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration Chuan Zheng
2020-11-11 15:51 ` Daniel P. Berrangé [this message]

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=20201111155101.GH906488@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.chen@huawei.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=wanghao232@huawei.com \
    --cc=xiexiangyou@huawei.com \
    --cc=yubihong@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhengchuan@huawei.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 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).