From patchwork Fri Jul 29 15:33:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 107407 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DF6C8B6EE8 for ; Sat, 30 Jul 2011 01:33:49 +1000 (EST) Received: from localhost ([::1]:56153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmp4J-0005r6-94 for incoming@patchwork.ozlabs.org; Fri, 29 Jul 2011 11:33:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmp44-0005cp-D7 for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qmp43-0001G2-Ii for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:33:28 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:48867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qmp43-0001Cq-Fs for qemu-devel@nongnu.org; Fri, 29 Jul 2011 11:33:27 -0400 Received: by mail-gx0-f173.google.com with SMTP id 26so3117836gxk.4 for ; Fri, 29 Jul 2011 08:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=jb6tT3tq+mv9zTfwYK5kz3CWt4jpfXwIiiBk18pLeus=; b=wP5ZEJxFOI/Bw7aBjJioHq+oCh299auT3t9uWKTyxi/YlDY9734+ojBnW4hwZ7mJBc hheb30cPYuklWQCKQcq38imct9V3TwKyyVoEw1SfTLrRvDk/2AbTyxmPhbSF15iqn2Lp chDFtBpcq7WWs+LegjHjigQDfSyv44iD37WKI= Received: by 10.147.146.12 with SMTP id y12mr1209445yan.12.1311953607265; Fri, 29 Jul 2011 08:33:27 -0700 (PDT) Received: from localhost.localdomain (93-34-199-31.ip51.fastwebnet.it [93.34.199.31]) by mx.google.com with ESMTPS id p17sm2015843ano.6.2011.07.29.08.33.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 29 Jul 2011 08:33:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 29 Jul 2011 17:33:05 +0200 Message-Id: <1311953585-16021-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1311953585-16021-1-git-send-email-pbonzini@redhat.com> References: <1311953585-16021-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.173 Subject: [Qemu-devel] [PATCH v2 0.15 4/4] Partially revert "savevm: fix corruption in vmstate_subsection_load()." X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts the additional check in commit eb60260d (but not the assertions). The new format does not require the check, and with the old format it traded one kind of bogus failure for a different kind of silent failure. Signed-off-by: Paolo Bonzini --- savevm.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/savevm.c b/savevm.c index 197af4b..c849914 100644 --- a/savevm.c +++ b/savevm.c @@ -1687,10 +1687,6 @@ static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd, { const VMStateSubsection *sub = vmsd->subsections; - if (!sub || !sub->needed) { - return 0; - } - while (qemu_peek_byte(f) == QEMU_VM_SUBSECTION) { char idstr[256]; int ret;