From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: Lukas Straub <lukasstraub2@web.de>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: [PULL 2/7] multifd: Unconditionally unregister yank function
Date: Thu, 9 Sep 2021 12:33:41 +0200 [thread overview]
Message-ID: <20210909103346.1990-3-quintela@redhat.com> (raw)
In-Reply-To: <20210909103346.1990-1-quintela@redhat.com>
From: Lukas Straub <lukasstraub2@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela
<quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras Soares
Passos <lsoaresp@redhat.com>
Date: Wed, 4 Aug 2021 21:26:32 +0200 (5 weeks, 11 hours, 52 minutes ago)
[[PGP Signed Part:No public key for 35AB0B289C5DB258 created at 2021-08-04T21:26:32+0200 using RSA]]
Unconditionally unregister yank function in multifd_load_cleanup().
If it is not unregistered here, it will leak and cause a crash
in yank_unregister_instance(). Now if the ioc is still in use
afterwards, it will only lead to qemu not being able to recover
from a hang related to that ioc.
After checking the code, i am pretty sure that ref is always 1
when arriving here. So all this currently does is remove the
unneeded check.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/multifd.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index 5a4f158f3c..efd424bc97 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -991,10 +991,7 @@ int multifd_load_cleanup(Error **errp)
for (i = 0; i < migrate_multifd_channels(); i++) {
MultiFDRecvParams *p = &multifd_recv_state->params[i];
- if (OBJECT(p->c)->ref == 1) {
- migration_ioc_unregister_yank(p->c);
- }
-
+ migration_ioc_unregister_yank(p->c);
object_unref(OBJECT(p->c));
p->c = NULL;
qemu_mutex_destroy(&p->mutex);
--
2.31.1
next prev parent reply other threads:[~2021-09-09 10:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 10:33 [PULL 0/7] Migration.next patches Juan Quintela
2021-09-09 10:33 ` [PULL 1/7] multifd: Implement yank for multifd send side Juan Quintela
2021-09-09 10:33 ` Juan Quintela [this message]
2021-09-09 10:33 ` [PULL 3/7] migration/rdma: Try to register On-Demand Paging memory region Juan Quintela
2021-09-09 10:33 ` [PULL 4/7] migration/rdma: advise prefetch write for ODP region Juan Quintela
2021-09-09 10:33 ` [PULL 5/7] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*() Juan Quintela
2021-09-09 10:33 ` [PULL 6/7] migration: allow multifd for socket protocol only Juan Quintela
2021-09-09 10:33 ` [PULL 7/7] migration: allow enabling mutilfd for specific " Juan Quintela
2021-09-09 13:42 ` [PULL 0/7] Migration.next patches Peter Maydell
2021-09-09 14:48 ` Li, Zhijian
2021-09-09 14:59 ` Peter Maydell
2021-09-09 15:23 ` Juan Quintela
2021-09-09 15:36 ` Peter Maydell
2021-09-09 16:10 ` Juan Quintela
2021-09-10 5:20 ` lizhijian
2021-09-10 5:27 ` lizhijian
2021-09-10 7:00 ` Juan Quintela
2021-09-10 8:52 ` lizhijian
2021-09-10 12:55 ` Philippe Mathieu-Daudé
2021-09-10 13:10 ` Li, Zhijian
-- strict thread matches above, loose matches on Subject: below --
2021-10-19 9:29 Juan Quintela
2021-10-19 9:29 ` [PULL 2/7] multifd: Unconditionally unregister yank function Juan Quintela
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=20210909103346.1990-3-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lukasstraub2@web.de \
--cc=qemu-devel@nongnu.org \
/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).