[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/26] migration: Properly destroy variables on incoming side
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 01/26] migration: Properly destroy variables on incoming side |
Date: |
Fri, 25 Sep 2020 13:06:30 +0100 |
From: Peter Xu <peterx@redhat.com>
In migration_incoming_state_destroy(), we've got a few variables that aren't
destroyed properly, namely:
main_thread_load_event
postcopy_pause_sem_dst
postcopy_pause_sem_fault
rp_mutex
Destroy them properly.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20200908203022.341615-2-peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/migration.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index d9d1e0b190..3495c9e542 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -238,12 +238,15 @@ void migration_incoming_state_destroy(void)
mis->postcopy_remote_fds = NULL;
}
- qemu_event_reset(&mis->main_thread_load_event);
-
if (mis->socket_address_list) {
qapi_free_SocketAddressList(mis->socket_address_list);
mis->socket_address_list = NULL;
}
+
+ qemu_event_destroy(&mis->main_thread_load_event);
+ qemu_sem_destroy(&mis->postcopy_pause_sem_dst);
+ qemu_sem_destroy(&mis->postcopy_pause_sem_fault);
+ qemu_mutex_destroy(&mis->rp_mutex);
}
static void migrate_generate_event(int new_state)
--
2.26.2
- [PULL 00/26] migration and friends queue, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 01/26] migration: Properly destroy variables on incoming side,
Dr. David Alan Gilbert (git) <=
- [PULL 02/26] migration: Rework migrate_send_rp_req_pages() function, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 04/26] migration/dirtyrate: add DirtyRateStatus to denote calculation status, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 03/26] migration/dirtyrate: setup up query-dirtyrate framwork, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 05/26] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 06/26] migration/dirtyrate: Add dirtyrate statistics series functions, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 07/26] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 08/26] migration/dirtyrate: Record hash results for each sampled page, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 09/26] migration/dirtyrate: Compare page hash results for recorded sampled page, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 10/26] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 11/26] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid(), Dr. David Alan Gilbert (git), 2020/09/25