[not -rc material; target QEMU 11.0 only]

Based-on: <[email protected]>

This series is based on Markus's recent fix:

[PATCH] migration: Fix double-free on error path
https://lore.kernel.org/r/[email protected]

This series should address the issues discussed in this thread here:

https://lore.kernel.org/r/[email protected]

The problem is Error is not a good candidate of g_autoptr, however the
cleanup function was accidentally merged.  Luckily, we only have two users
so far (after Markus's patch above).  This series removes the last two in
migration code and reverts the auto cleanup function for Error.

When at it, it'll also change migrate_set_error() to start taking ownership
of errors, just like what most error APIs do.  When at it, it is renamed to
migrate_error_propagate() to imply migration version of error_propagate().

Comments welcomed, thanks.

Peter Xu (6):
  migration: Use explicit error_free() instead of g_autoptr
  Revert "error: define g_autoptr() cleanup function for the Error type"
  migration: Make migration_connect_set_error() own the error
  migration: Make multifd_send_set_error() own the error
  migration: Make multifd_recv_terminate_threads() own the error
  migration: Replace migrate_set_error() with migrate_error_propagate()

 include/qapi/error.h             |  2 --
 migration/migration.h            |  2 +-
 migration/channel.c              |  1 -
 migration/cpr-exec.c             |  4 +--
 migration/migration.c            | 51 ++++++++++++++++----------------
 migration/multifd-device-state.c |  6 ++--
 migration/multifd.c              | 24 +++++++--------
 migration/postcopy-ram.c         |  5 ++--
 migration/ram.c                  |  4 +--
 migration/savevm.c               | 16 ++++------
 10 files changed, 49 insertions(+), 66 deletions(-)

-- 
2.50.1


Reply via email to