From: Matthew Rosato Date: Thu, 13 Nov 2025 21:35:45 +0000 (-0500) Subject: migration: set correct list pointer when removing notifier X-Git-Tag: v10.2.0-rc2~11^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=911bdd34ca1a3f9e62836e7bc581e7edc57319be;p=thirdparty%2Fqemu.git migration: set correct list pointer when removing notifier In migration_remove_notifier(), g_slist_remove() will search for and potentially remove an entry from the specified list. The return value should be used to update the potentially-changed head pointer of the list that was just searched (migration_state_notifiers[mode]) instead of the migration blockers list. Fixes: dc79c7d5e1 ("migration: multi-mode notifier") Signed-off-by: Matthew Rosato Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/r/20251113213545.513453-1-mjrosato@linux.ibm.com Signed-off-by: Peter Xu --- diff --git a/migration/migration.c b/migration/migration.c index 1b2c02d7fa..b316ee01ab 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1693,7 +1693,7 @@ void migration_remove_notifier(NotifierWithReturn *notify) { if (notify->notify) { for (MigMode mode = 0; mode < MIG_MODE__MAX; mode++) { - migration_blockers[mode] = + migration_state_notifiers[mode] = g_slist_remove(migration_state_notifiers[mode], notify); } notify->notify = NULL;