From nobody Sun Nov 24 04:55:31 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1726684433; cv=none; d=zohomail.com; s=zohoarc; b=VBVwTqyCDjsEFM+w6E8Fz3IsKd++ZuB3zI2AgfQRg/8gmYUfClKGF+gmiSVkffznKvxW5ZF7IfH2/5KkO9Eiic2m/vu/1zj182IJSEeOanxvYyIDulY5wskq7U9xy87iarPuj0k4DbS5X6yiyniYAWYvNJyXeTdaDD6kHc+ZRWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726684433; h=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=w4/INXL/PVn5TMqQnxTEKZfK/Si8TZmajwPGuc+4jWg=; b=KP+HfCGqQ2T67aCIIVZAQsbVS/Yl8nAVwXv/lOVDT0Ve8v8qcgoJg91p3xkX4BkhYu6dTIsblrVClfBu3bKXJ8R2AIpe89bY+OYZVczkuzN0EqzeFZHpas5JO1vHElcFYgxUYtWAevD5O777cQpdILQmS6y9ofYfxYuReMfpTMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1726684433106783.5106245006027; Wed, 18 Sep 2024 11:33:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqzTM-0002Oc-HC; Wed, 18 Sep 2024 14:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqzTI-00028H-IO for qemu-devel@nongnu.org; Wed, 18 Sep 2024 14:32:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqzTD-00020l-0g for qemu-devel@nongnu.org; Wed, 18 Sep 2024 14:32:12 -0400 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-DGZnF_SaO0KQLDE2M0TILg-1; Wed, 18 Sep 2024 14:32:05 -0400 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4581d371964so559691cf.1 for ; Wed, 18 Sep 2024 11:32:05 -0700 (PDT) Received: from x1n.. (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c75e494a28sm30486d6.68.2024.09.18.11.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 11:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726684326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w4/INXL/PVn5TMqQnxTEKZfK/Si8TZmajwPGuc+4jWg=; b=bVMiBzcD4OyKsBt0cI+tA6Ukod3PCgYpIEeZSHldKLmMh3J3WLfGWI7PYFGssSBt6CMe9q nU7O9AQUtx1DQd7vQrJ09TIYzJeAmCExo7oUbNgWmVfPg2TR2C/58gogejuD67Y8FjBu/A TDrfNHjonY7I77n/68Ei00KygASkGi0= X-MC-Unique: DGZnF_SaO0KQLDE2M0TILg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726684324; x=1727289124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w4/INXL/PVn5TMqQnxTEKZfK/Si8TZmajwPGuc+4jWg=; b=Eu0l2u5q4pm9xH5SSKVWs6nEGZoWY4VSjZ81+lpBuRScROQwoMqA5+CdH/KuAnQMb4 B6YvBkQQzQ3QCm79aN+srjPF2DNTl4QwJSP1hm9A70aJojtq/RuSkyzJf+VNkZEC1gPp 3xgaxHGBcxJ/ywlaLegycxBIom6jf3u4UaY/o5jXvk0wcp/4P8jvHVPDUj0i+CSxbu9E LSqmVhezRT6RcXedVCkJu2X1x9sSBk4aWw4vWqnSLp7VHH9OtR1LGKHIWPjVI/oBD71C V0eGDBdNqPA0mYK2wO7VkluAS7ceLgXbYAz47hiGFNa79WcHJ2HRGYjluwHm2GtnRc8j ThkQ== X-Gm-Message-State: AOJu0YxN6r5MWPlh8b/ycIlpI+pK5e9BTCmA3vxiaZeeLruCgXxqymAQ JXIih2yG1+FDcIZydKCx9IOj3HWyDo6QVmcIOG/BeT4I2ffVogKjX0UJ2Rf8JR2CKyXwKQvYhHR M7JtxAaXEtWpCbeE0UiHtT1i27jrMoJc7qsr+SrvHEZYxe5AFhRGze7hjU7ybPYl3DzASyG/hy2 8Yp9ydaUR7YdC5uYuFyUOd8yTVqJInUZ0dyw== X-Received: by 2002:a05:6214:448b:b0:6c5:681e:1d4 with SMTP id 6a1803df08f44-6c5736cbbb9mr439299036d6.34.1726684324006; Wed, 18 Sep 2024 11:32:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJi16r2N/lzXN4dbpFGtJgjveCfMxRgrJhniOuy7eKhoXuY2yCxnp6Stvu3hu462F+ia/VSw== X-Received: by 2002:a05:6214:448b:b0:6c5:681e:1d4 with SMTP id 6a1803df08f44-6c5736cbbb9mr439298636d6.34.1726684323504; Wed, 18 Sep 2024 11:32:03 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Cc: Paolo Bonzini , David Hildenbrand , Peter Maydell , Fabiano Rosas , peterx@redhat.com Subject: [PULL v2 5/6] migration/savevm: Remove extra load cleanup calls Date: Wed, 18 Sep 2024 14:31:50 -0400 Message-ID: <20240918183151.6413-6-peterx@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240918183151.6413-1-peterx@redhat.com> References: <20240918183151.6413-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1726684434959116600 Content-Type: text/plain; charset="utf-8" From: Fabiano Rosas There are two qemu_loadvm_state_cleanup() calls that were introduced when qemu_loadvm_state_setup() was still called before loading the configuration section, so there was state to be cleaned up if the header checks failed. However, commit 9e14b84908 ("migration/savevm: load_header before load_setup") has moved that configuration section part to qemu_loadvm_state_header() which now happens before qemu_loadvm_state_setup(). Remove the cleanup calls that are now misplaced. Note that we didn't use Fixes because it's benign to cleanup() even if setup() is not invoked. So this patch is not needed for stable, as it falls into cleanup category. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Link: https://lore.kernel.org/r/20240917185802.15619-2-farosas@suse.de [peterx: added last paragraph of commit message] Signed-off-by: Peter Xu --- migration/savevm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index d500eae979..d0759694fd 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2732,13 +2732,11 @@ static int qemu_loadvm_state_header(QEMUFile *f) if (migrate_get_current()->send_configuration) { if (qemu_get_byte(f) !=3D QEMU_VM_CONFIGURATION) { error_report("Configuration section missing"); - qemu_loadvm_state_cleanup(); return -EINVAL; } ret =3D vmstate_load_state(f, &vmstate_configuration, &savevm_stat= e, 0); =20 if (ret) { - qemu_loadvm_state_cleanup(); return ret; } } --=20 2.45.0