From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Xiaohui Li <xiaohli@redhat.com>,
qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v2 1/6] migration: Properly destroy variables on incoming side
Date: Wed, 9 Sep 2020 11:21:30 +0100 [thread overview]
Message-ID: <20200909102130.GD2866@work-vm> (raw)
In-Reply-To: <20200908203022.341615-2-peterx@redhat.com>
* Peter Xu (peterx@redhat.com) wrote:
> 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>
Reviewed-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 58a5452471..749d9b145b 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
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2020-09-09 10:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 20:30 [PATCH v2 0/6] migration/postcopy: Sync faulted addresses after network recovered Peter Xu
2020-09-08 20:30 ` [PATCH v2 1/6] migration: Properly destroy variables on incoming side Peter Xu
2020-09-09 10:21 ` Dr. David Alan Gilbert [this message]
2020-09-08 20:30 ` [PATCH v2 2/6] migration: Rework migrate_send_rp_req_pages() function Peter Xu
2020-09-08 20:30 ` [PATCH v2 3/6] migration: Pass incoming state into qemu_ufd_copy_ioctl() Peter Xu
2020-09-08 20:30 ` [PATCH v2 4/6] migration: Introduce migrate_send_rp_message_req_pages() Peter Xu
2020-09-08 20:30 ` [PATCH v2 5/6] migration: Maintain postcopy faulted addresses Peter Xu
2020-09-10 9:44 ` Dr. David Alan Gilbert
2020-09-08 20:30 ` [PATCH v2 6/6] migration: Sync requested pages after postcopy recovery Peter Xu
2020-09-23 17:43 ` [PATCH v2 0/6] migration/postcopy: Sync faulted addresses after network recovered Dr. David Alan Gilbert
2020-09-25 11:50 ` Dr. David Alan Gilbert
2020-09-25 13:46 ` Peter Xu
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=20200909102130.GD2866@work-vm \
--to=dgilbert@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=xiaohli@redhat.com \
/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).