From nobody Mon Feb 9 23:00:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1698153364; cv=none; d=zohomail.com; s=zohoarc; b=BJW21tDwmBhzWM32QrGtLefuB3BHiOemz1Q7gJ6JGhEtOLBaDSaBFyCiiwuedGoUFh7nfjkUP82RZs6iCdiwynhfbyGBjU9FEbaXma8yHlCnLlMWRMEcxe+40uQn+j4TTubsM2+ScxGU2UPk32wkdVRNsqKi2KaWVPbFaRjCb2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698153364; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=12UW4S7DwReY5i7WbgLvv6myQHnsED050vB3pRolHAs=; b=Bad0NWyLB7cSNIOKNHikV7wXg/+3s0uL2UUZCIfzSG3wmuvZcyPEaqZMvRw9d3Ft6D2EfR7aRF3Tzbyr8GQ6AE+JI5nQ/GnO0VaS6XeOCWEXP5svYTVK5Qh+TXWqv89EfMYJA450ZQMec4I3++MaMbjASyJ97v+82XE5YpKg+Uc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16981533647049.144569912453449; Tue, 24 Oct 2023 06:16:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-383-s5toVdFxOlCnmAx0RqxG5Q-1; Tue, 24 Oct 2023 09:15:59 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B4C7B1019C9F; Tue, 24 Oct 2023 13:15:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D38225C0; Tue, 24 Oct 2023 13:15:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8D7B2194658C; Tue, 24 Oct 2023 13:15:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 48B8E1946586 for ; Tue, 24 Oct 2023 13:15:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2AF181C060BC; Tue, 24 Oct 2023 13:15:54 +0000 (UTC) Received: from secure.mitica (unknown [10.39.194.127]) by smtp.corp.redhat.com (Postfix) with ESMTP id 763D11C060AE; Tue, 24 Oct 2023 13:15:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698153363; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=12UW4S7DwReY5i7WbgLvv6myQHnsED050vB3pRolHAs=; b=iIcPHAcAQzS0gqqaWg8jXWwVZq7dnn/qDM8clyjwyQ0MA4wb0OvuzCiTVuPk4tPZcQFuOR O3mJQa61DY1ni3JJCZ1A17tDf3FQGfFjvenqXgyaHMQeLx67l2vn8g3iNc5Z6/mqkkUAJd ypXthWw2uaIWI0ywDMW4GKP+CuNM05s= X-MC-Unique: s5toVdFxOlCnmAx0RqxG5Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Juan Quintela To: qemu-devel@nongnu.org Subject: [PULL 24/39] migration: set file error on subsection loading Date: Tue, 24 Oct 2023 15:12:50 +0200 Message-ID: <20231024131305.87468-25-quintela@redhat.com> In-Reply-To: <20231024131305.87468-1-quintela@redhat.com> References: <20231024131305.87468-1-quintela@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Corey Minyard , libvir-list@redhat.com, Jason Wang , Mark Cave-Ayland , Li Zhijian , Peter Xu , Gerd Hoffmann , Eric Blake , Fabiano Rosas , qemu-block@nongnu.org, Juan Quintela , Daniel Henrique Barboza , Markus Armbruster , Halil Pasic , Marcel Apfelbaum , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Christian Borntraeger , Thomas Huth , Corey Minyard , Harsh Prateek Bora , Stefan Weil , Richard Henderson , Nicholas Piggin , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Stefan Hajnoczi , Samuel Thibault , David Hildenbrand , John Snow , David Gibson , Kevin Wolf , "Michael S. Tsirkin" , Ilya Leoshkevich , Hanna Reitz , Leonardo Bras , qemu-ppc@nongnu.org Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698153366247100005 From: Marc-Andr=C3=A9 Lureau commit 13cde50889237 ("vmstate: Return error in case of error") sets QemuFile error to stop reading from it and report to the caller (checked by unit tests). We should do the same on subsection loading error. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231024084043.2926316-8-marcandre.lureau@redhat.com> --- migration/vmstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 16e33a5d34..9c36803c8a 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -179,6 +179,7 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescri= ption *vmsd, assert(field->flags =3D=3D VMS_END); ret =3D vmstate_subsection_load(f, vmsd, opaque); if (ret !=3D 0) { + qemu_file_set_error(f, ret); return ret; } if (vmsd->post_load) { --=20 2.41.0