diff options
author | Peter Maydell | 2020-11-12 21:13:01 +0100 |
---|---|---|
committer | Peter Maydell | 2020-11-12 21:13:01 +0100 |
commit | 4cfac0152e798f9c60472706c0441501da13183c (patch) | |
tree | aa52af2f3606e4a6f310f660cc11e899eafd79ce /migration/multifd.c | |
parent | Merge remote-tracking branch 'remotes/mcayland/tags/qemu-macppc-20201112' int... (diff) | |
parent | virtiofsd: check whether strdup lo.source return NULL in main func (diff) | |
download | qemu-4cfac0152e798f9c60472706c0441501da13183c.tar.gz qemu-4cfac0152e798f9c60472706c0441501da13183c.tar.xz qemu-4cfac0152e798f9c60472706c0441501da13183c.zip |
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201112a' into staging
Migration & virtiofs fixes for 5.2
A bunch of small fixes.
# gpg: Signature made Thu 12 Nov 2020 18:34:41 GMT
# gpg: using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7
* remotes/dgilbert/tags/pull-migration-20201112a:
virtiofsd: check whether strdup lo.source return NULL in main func
virtiofsd: check whether lo_map_reserve returns NULL in, main func
tools/virtiofsd/buffer.c: check whether buf is NULL in fuse_bufvec_advance func
virtiofsd: Announce submounts even without statx()
migration: handle CANCELLING state in migration_completion()
multifd/tls: fix memoryleak of the QIOChannelSocket object when cancelling migration
migration/dirtyrate: simplify includes in dirtyrate.c
migration: fix uninitialized variable warning in migrate_send_rp_req_pages()
migration/multifd: fix hangup with TLS-Multifd due to blocking handshake
ACPI: Avoid infinite recursion when dump-vmstate
migration/ram: Fix hexadecimal format string specifier
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration/multifd.c')
-rw-r--r-- | migration/multifd.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index 68b171fb61..45c690aa11 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -739,6 +739,19 @@ static void multifd_tls_outgoing_handshake(QIOTask *task, multifd_channel_connect(p, ioc, err); } +static void *multifd_tls_handshake_thread(void *opaque) +{ + MultiFDSendParams *p = opaque; + QIOChannelTLS *tioc = QIO_CHANNEL_TLS(p->c); + + qio_channel_tls_handshake(tioc, + multifd_tls_outgoing_handshake, + p, + NULL, + NULL); + return NULL; +} + static void multifd_tls_channel_connect(MultiFDSendParams *p, QIOChannel *ioc, Error **errp) @@ -752,14 +765,13 @@ 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, - multifd_tls_outgoing_handshake, - p, - NULL, - NULL); - + p->c = QIO_CHANNEL(tioc); + qemu_thread_create(&p->thread, "multifd-tls-handshake-worker", + multifd_tls_handshake_thread, p, + QEMU_THREAD_JOINABLE); } static bool multifd_channel_connect(MultiFDSendParams *p, |