* [PULL 0/2] Migration 20231130 patches
@ 2023-11-30 10:41 Juan Quintela
2023-11-30 10:41 ` [PULL 1/2] migration/multifd: Stop setting p->ioc before connecting Juan Quintela
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juan Quintela @ 2023-11-30 10:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Juan Quintela, Leonardo Bras, Fabiano Rosas, Peter Xu
The following changes since commit abf635ddfe3242df907f58967f3c1e6763bbca2d:
Update version for v8.2.0-rc2 release (2023-11-28 16:31:16 -0500)
are available in the Git repository at:
https://gitlab.com/juan.quintela/qemu.git tags/migration-20231130-pull-request
for you to fetch changes up to 41581265aa83127036e4f2d6417820f59276514b:
migration: free 'saddr' since be no longer used (2023-11-30 09:51:24 +0100)
----------------------------------------------------------------
Migration Pull request (20231130)
Hi
In this pull request:
- fix form p-ioc set too soon
- free 'saddr' at the right time
Please, apply.
CI: https://gitlab.com/juan.quintela/qemu/-/pipelines/1090495323
----------------------------------------------------------------
Fabiano Rosas (1):
migration/multifd: Stop setting p->ioc before connecting
Zongmin Zhou (1):
migration: free 'saddr' since be no longer used
migration/migration.c | 5 +++--
migration/multifd.c | 3 +--
2 files changed, 4 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PULL 1/2] migration/multifd: Stop setting p->ioc before connecting
2023-11-30 10:41 [PULL 0/2] Migration 20231130 patches Juan Quintela
@ 2023-11-30 10:41 ` Juan Quintela
2023-11-30 10:41 ` [PULL 2/2] migration: free 'saddr' since be no longer used Juan Quintela
2023-12-01 19:58 ` [PULL 0/2] Migration 20231130 patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2023-11-30 10:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Juan Quintela, Leonardo Bras, Fabiano Rosas, Peter Xu
From: Fabiano Rosas <farosas@suse.de>
This is being shadowed but the assignments at
multifd_channel_connect() and multifd_tls_channel_connect() .
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20231110200241.20679-2-farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/multifd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index ec58c58082..409460684f 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -883,8 +883,7 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
trace_multifd_new_send_channel_async(p->id);
if (!qio_task_propagate_error(task, &local_err)) {
- p->c = ioc;
- qio_channel_set_delay(p->c, false);
+ qio_channel_set_delay(ioc, false);
p->running = true;
if (multifd_channel_connect(p, ioc, &local_err)) {
return;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PULL 2/2] migration: free 'saddr' since be no longer used
2023-11-30 10:41 [PULL 0/2] Migration 20231130 patches Juan Quintela
2023-11-30 10:41 ` [PULL 1/2] migration/multifd: Stop setting p->ioc before connecting Juan Quintela
@ 2023-11-30 10:41 ` Juan Quintela
2023-12-01 19:58 ` [PULL 0/2] Migration 20231130 patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2023-11-30 10:41 UTC (permalink / raw)
To: qemu-devel
Cc: Juan Quintela, Leonardo Bras, Fabiano Rosas, Peter Xu,
Zongmin Zhou, Daniel P . Berrangé
From: Zongmin Zhou <zhouzongmin@kylinos.cn>
Since socket_parse() will allocate memory for 'saddr',and its value
will pass to 'addr' that allocated by migrate_uri_parse(),
then 'saddr' will no longer used,need to free.
But due to 'saddr->u' is shallow copying the contents of the union,
the members of this union containing allocated strings,and will be used after that.
So just free 'saddr' itself without doing a deep free on the contents of the SocketAddress.
Fixes: 72a8192e225c ("migration: convert migration 'uri' into 'MigrateAddress'")
Signed-off-by: Zongmin Zhou<zhouzongmin@kylinos.cn>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231120031428.908295-1-zhouzongmin@kylinos.cn>
---
migration/migration.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 28a34c9068..1832dad618 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -462,7 +462,6 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel,
{
g_autoptr(MigrationChannel) val = g_new0(MigrationChannel, 1);
g_autoptr(MigrationAddress) addr = g_new0(MigrationAddress, 1);
- SocketAddress *saddr = NULL;
InetSocketAddress *isock = &addr->u.rdma;
strList **tail = &addr->u.exec.args;
@@ -487,12 +486,14 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel,
strstart(uri, "vsock:", NULL) ||
strstart(uri, "fd:", NULL)) {
addr->transport = MIGRATION_ADDRESS_TYPE_SOCKET;
- saddr = socket_parse(uri, errp);
+ SocketAddress *saddr = socket_parse(uri, errp);
if (!saddr) {
return false;
}
addr->u.socket.type = saddr->type;
addr->u.socket.u = saddr->u;
+ /* Don't free the objects inside; their ownership moved to "addr" */
+ g_free(saddr);
} else if (strstart(uri, "file:", NULL)) {
addr->transport = MIGRATION_ADDRESS_TYPE_FILE;
addr->u.file.filename = g_strdup(uri + strlen("file:"));
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PULL 0/2] Migration 20231130 patches
2023-11-30 10:41 [PULL 0/2] Migration 20231130 patches Juan Quintela
2023-11-30 10:41 ` [PULL 1/2] migration/multifd: Stop setting p->ioc before connecting Juan Quintela
2023-11-30 10:41 ` [PULL 2/2] migration: free 'saddr' since be no longer used Juan Quintela
@ 2023-12-01 19:58 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2023-12-01 19:58 UTC (permalink / raw)
To: Juan Quintela
Cc: qemu-devel, Juan Quintela, Leonardo Bras, Fabiano Rosas, Peter Xu
[-- Attachment #1: Type: text/plain, Size: 115 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-03 18:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 10:41 [PULL 0/2] Migration 20231130 patches Juan Quintela
2023-11-30 10:41 ` [PULL 1/2] migration/multifd: Stop setting p->ioc before connecting Juan Quintela
2023-11-30 10:41 ` [PULL 2/2] migration: free 'saddr' since be no longer used Juan Quintela
2023-12-01 19:58 ` [PULL 0/2] Migration 20231130 patches Stefan Hajnoczi
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).