qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-11.0 0/6] migration: Error reporting cleanups
@ 2025-11-25 20:46 Peter Xu
  2025-11-25 20:46 ` [PATCH for-11.0 1/6] migration: Use explicit error_free() instead of g_autoptr Peter Xu
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Peter Xu @ 2025-11-25 20:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: Markus Armbruster, Juraj Marcin, peterx, Marc-André Lureau,
	Fabiano Rosas, Daniel P . Berrangé,
	Vladimir Sementsov-Ogievskiy

[not -rc material; target QEMU 11.0 only]

Based-on: <20251125070554.2256181-1-armbru@redhat.com>

This series is based on Markus's recent fix:

[PATCH] migration: Fix double-free on error path
https://lore.kernel.org/r/20251125070554.2256181-1-armbru@redhat.com

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

https://lore.kernel.org/r/871plmk1bc.fsf@pond.sub.org

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



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2025-12-01 17:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 20:46 [PATCH for-11.0 0/6] migration: Error reporting cleanups Peter Xu
2025-11-25 20:46 ` [PATCH for-11.0 1/6] migration: Use explicit error_free() instead of g_autoptr Peter Xu
2025-11-26  6:43   ` Markus Armbruster
2025-11-25 20:46 ` [PATCH for-11.0 2/6] Revert "error: define g_autoptr() cleanup function for the Error type" Peter Xu
2025-11-26  6:45   ` Markus Armbruster
2025-11-26  7:43   ` Cédric Le Goater
2025-11-26  8:08     ` Markus Armbruster
2025-11-26 14:34   ` [PATCH 2.5/6] error: Explain why we don't g_autoptr(Error) Markus Armbruster
2025-11-26 15:14     ` Cédric Le Goater
2025-11-26 16:18       ` Peter Xu
2025-11-27  7:01         ` Markus Armbruster
2025-11-26 20:21   ` [PATCH for-11.0 2/6] Revert "error: define g_autoptr() cleanup function for the Error type" Maciej S. Szmigiero
2025-11-27  7:10   ` [PATCH 2.5/6] error: Poison g_autoptr(Error) to prevent its use Markus Armbruster
2025-11-27 15:34     ` Cédric Le Goater
2025-11-25 20:46 ` [PATCH for-11.0 3/6] migration: Make migration_connect_set_error() own the error Peter Xu
2025-11-26  7:27   ` Markus Armbruster
2025-11-28 16:58     ` Peter Xu
2025-11-25 20:46 ` [PATCH for-11.0 4/6] migration: Make multifd_send_set_error() " Peter Xu
2025-11-26  7:30   ` Markus Armbruster
2025-11-26  7:32     ` Markus Armbruster
2025-11-25 20:46 ` [PATCH for-11.0 5/6] migration: Make multifd_recv_terminate_threads() " Peter Xu
2025-11-25 20:46 ` [PATCH for-11.0 6/6] migration: Replace migrate_set_error() with migrate_error_propagate() Peter Xu
2025-11-26  7:57   ` Markus Armbruster
2025-12-01 17:32     ` Peter Xu

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).