From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXUd2-0008CV-BN for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:41:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXUd0-0005pi-1B for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:41:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39440) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dXUcz-0005pW-R7 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 11:41:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C614DD6481 for ; Tue, 18 Jul 2017 15:41:36 +0000 (UTC) From: Juan Quintela Date: Tue, 18 Jul 2017 17:41:13 +0200 Message-Id: <20170718154127.6459-3-quintela@redhat.com> In-Reply-To: <20170718154127.6459-1-quintela@redhat.com> References: <20170718154127.6459-1-quintela@redhat.com> Subject: [Qemu-devel] [PULL 02/16] migration: Close file on failed migration load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dgilbert@redhat.com, lvivier@redhat.com, peterx@redhat.com From: "Dr. David Alan Gilbert" Closing the file before exit on a failure allows the source to cleanup better, especially with RDMA. Partial fix for https://bugs.launchpad.net/qemu/+bug/1545052 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Message-Id: <20170717110936.23314-3-dgilbert@redhat.com> Signed-off-by: Juan Quintela --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index a0db40d..8552f54 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -348,6 +348,7 @@ static void process_incoming_migration_co(void *opaque) migrate_set_state(&mis->state, MIGRATION_STATUS_ACTIVE, MIGRATION_STATUS_FAILED); error_report("load of migration failed: %s", strerror(-ret)); + qemu_fclose(mis->from_src_file); exit(EXIT_FAILURE); } mis->bh = qemu_bh_new(process_incoming_migration_bh, mis); -- 2.9.4