From nobody Tue Apr 30 05:07:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587552964; cv=none; d=zohomail.com; s=zohoarc; b=HLKaaJIF4Acod2xXV8MzPsfpvFKjcd5NvDSkNd+VDIz7bVPSs6PfBvsEjbicTHZDhBEms1PytA+bL4y8WvSj2JjGMXKe94IsWCyibqMF7tcGSxyY0KJbd8sw+svvam65NTFgdXOj/RIRmPbuVCGCAPZJK+VRkmVLhWkQDhOHDoo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587552964; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=EKsOAaBphw2PPQcv/MD5gFJYa+fBFtSc7LjuZZJf3HM=; b=P2mj5UaCSxuFJ9I702uHjXSV9wp559fJwjpVlnX1rX8jGl88wwE1GOBXDDitVNHkAkJRBoJJU7UOHXhsId0NAB3vrCmMfpOnfabiXzxkcS2HCch6E2Su2RFN7YXknIrEqs7gHHaRnsv2DF1fCDGXRywdO+dGXvvpq/EKFlwh2KE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1587552964921645.7688290256343; Wed, 22 Apr 2020 03:56:04 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-143-nI8Yw98PPR-vmhVHoVLIeQ-1; Wed, 22 Apr 2020 06:56:01 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5F25A1401; Wed, 22 Apr 2020 10:55:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2D995C1B2; Wed, 22 Apr 2020 10:55:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 516481809540; Wed, 22 Apr 2020 10:55:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03MAsW8n024726 for ; Wed, 22 Apr 2020 06:54:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2A9975C3FA; Wed, 22 Apr 2020 10:54:32 +0000 (UTC) Received: from ibm-p8-15-fsp.mgmt.pnr.lab.eng.rdu2.redhat.com (unknown [10.40.195.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 669F15C1B2; Wed, 22 Apr 2020 10:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587552963; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EKsOAaBphw2PPQcv/MD5gFJYa+fBFtSc7LjuZZJf3HM=; b=Q5texqy8S3MNmoNKaGk47xCpP9/Up/xAMidKmPI6UUcQKLFV3ZMRTHhFjYm08wNPKu7ZTN lXoj4Pz3XOQh4B7918ZqREkv1WqJCOOhz/vCkw19cl9AWk1vZL5tzKGlfgEgWP0/ZwNMVk itYGEzM1Xcd+yH3zYmHOzQEBfQOTUYg= X-MC-Unique: nI8Yw98PPR-vmhVHoVLIeQ-1 From: Pavel Mores To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: fix domain start with corrupted save file Date: Wed, 22 Apr 2020 12:54:26 +0200 Message-Id: <20200422105426.1277137-1-pmores@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Pavel Mores X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This is to fix https://bugzilla.redhat.com/show_bug.cgi?id=3D1791522 With this change, if a domain comes across a corrupted save file during boo= t it removes the save file and logs a warning but continues to boot normally ins= tead of failing to boot (with a subsequent boot attempt succeeding). The regression was introduced by 21ad56e932 and this change effectively rev= erts the relevant part of that commit. --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e8d47a41cd..2579ef3984 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6810,13 +6810,14 @@ qemuDomainSaveImageOpen(virQEMUDriverPtr driver, *ret_def =3D def; *ret_data =3D data; =20 + cleanup: return fd; =20 error: virDomainDefFree(def); virQEMUSaveDataFree(data); VIR_FORCE_CLOSE(fd); - return -1; + goto cleanup; } =20 static int ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) --=20 2.24.1