[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/7] multifd: Unconditionally unregister yank function
From: |
Juan Quintela |
Subject: |
[PULL 2/7] multifd: Unconditionally unregister yank function |
Date: |
Thu, 9 Sep 2021 12:33:41 +0200 |
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
- [PULL 0/7] Migration.next patches, Juan Quintela, 2021/09/09
- [PULL 2/7] multifd: Unconditionally unregister yank function,
Juan Quintela <=
- [PULL 4/7] migration/rdma: advise prefetch write for ODP region, Juan Quintela, 2021/09/09
- [PULL 1/7] multifd: Implement yank for multifd send side, Juan Quintela, 2021/09/09
- [PULL 7/7] migration: allow enabling mutilfd for specific protocol only, Juan Quintela, 2021/09/09
- [PULL 5/7] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*(), Juan Quintela, 2021/09/09
- [PULL 6/7] migration: allow multifd for socket protocol only, Juan Quintela, 2021/09/09
- [PULL 3/7] migration/rdma: Try to register On-Demand Paging memory region, Juan Quintela, 2021/09/09
- Re: [PULL 0/7] Migration.next patches, Peter Maydell, 2021/09/09