From: Peter Xu <peterx@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 0/5] migration: Fix migration state reference counting
Date: Tue, 23 Jan 2024 10:19:53 +0800 [thread overview]
Message-ID: <Za8iSaCvoY1C0xVs@x1n> (raw)
In-Reply-To: <20240119233922.32588-1-farosas@suse.de>
On Fri, Jan 19, 2024 at 08:39:17PM -0300, Fabiano Rosas wrote:
> We currently have a bug when running migration code in bottom
> halves. The issue has already been reported in Gitlab[1] and it
> started happening very frequently on my machine for some reason.
>
> The issue is that we're dropping the last reference to the
> MigrationState object while the cleanup bottom half is still running
> and it leads to an use after free. More details on the commit message.
>
> This series fixes the issue and does a refactoring around the
> migration BH scheduling aiming to consolidate some code so that it is
> less error prone.
>
> 1- https://gitlab.com/qemu-project/qemu/-/issues/1969
>
> CI run: https://gitlab.com/farosas/qemu/-/pipelines/1144927625
>
> Fabiano Rosas (5):
> migration: Fix use-after-free of migration state object
> migration: Take reference to migration state around
> bg_migration_vm_start_bh
> migration: Reference migration state around
> loadvm_postcopy_handle_run_bh
> migration: Add a wrapper to qemu_bh_schedule
> migration: Centralize BH creation and dispatch
>
> migration/migration.c | 82 +++++++++++++++++++++++++------------------
> migration/migration.h | 5 +--
> migration/savevm.c | 5 +--
> 3 files changed, 49 insertions(+), 43 deletions(-)
Looks all good now, queued. I'll amend the "Resolve:" line in patch 1.
--
Peter Xu
prev parent reply other threads:[~2024-01-23 2:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 23:39 [PATCH 0/5] migration: Fix migration state reference counting Fabiano Rosas
2024-01-19 23:39 ` [PATCH 1/5] migration: Fix use-after-free of migration state object Fabiano Rosas
2024-01-19 23:43 ` Fabiano Rosas
2024-01-22 9:49 ` Peter Xu
2024-01-22 10:21 ` Peter Xu
2024-01-22 16:55 ` Fabiano Rosas
2024-01-23 1:56 ` Peter Xu
2024-01-19 23:39 ` [PATCH 2/5] migration: Take reference to migration state around bg_migration_vm_start_bh Fabiano Rosas
2024-01-19 23:39 ` [PATCH 3/5] migration: Reference migration state around loadvm_postcopy_handle_run_bh Fabiano Rosas
2024-01-19 23:39 ` [PATCH 4/5] migration: Add a wrapper to qemu_bh_schedule Fabiano Rosas
2024-01-19 23:39 ` [PATCH 5/5] migration: Centralize BH creation and dispatch Fabiano Rosas
2024-01-23 2:19 ` Peter Xu [this message]
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=Za8iSaCvoY1C0xVs@x1n \
--to=peterx@redhat.com \
--cc=farosas@suse.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).