migration: Fix migration state reference counting
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | migration: Fix use-after-free of migration state objectmigration/ | +2 | 5 replies | |
| 2/5 | migration: Take reference to migration state around bg_migration_vm_start_bhmigration/ | +2 | 0 replies | |
| 3/5 | migration: Reference migration state around loadvm_postcopy_handle_run_bhmigration/ | +2 | 0 replies | |
| 4/5 | migration: Add a wrapper to qemu_bh_schedulemigration/ | +14 | 0 replies | |
| 5/5 | migration: Centralize BH creation and dispatchmigration/ migration/ migration/ | +40 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] migration: Fix migration state reference counting
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(-)
Signature · 1 line
2.35.3