* [PATCH v2] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration
@ 2020-11-11 14:26 Chuan Zheng
2020-11-11 15:51 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Chuan Zheng @ 2020-11-11 14:26 UTC (permalink / raw)
To: quintela, dgilbert, berrange
Cc: yubihong, zhang.zhanghailiang, qemu-devel, xiexiangyou, alex.chen,
wanghao232
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,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration
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é
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2020-11-11 15:51 UTC (permalink / raw)
To: Chuan Zheng
Cc: yubihong, zhang.zhanghailiang, quintela, qemu-devel, xiexiangyou,
dgilbert, alex.chen, wanghao232
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 :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-11 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).