From nobody Mon May 6 00:53:16 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1546608807200764.2788413932785; Fri, 4 Jan 2019 05:33:27 -0800 (PST) Received: from localhost ([127.0.0.1]:35391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfPb7-00087D-3m for importer@patchew.org; Fri, 04 Jan 2019 08:33:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfPZW-00075v-HY for qemu-devel@nongnu.org; Fri, 04 Jan 2019 08:31:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfPZT-00028b-7R for qemu-devel@nongnu.org; Fri, 04 Jan 2019 08:31:34 -0500 Received: from 5.mo2.mail-out.ovh.net ([87.98.181.248]:47893) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfPZR-00021B-6v for qemu-devel@nongnu.org; Fri, 04 Jan 2019 08:31:29 -0500 Received: from player692.ha.ovh.net (unknown [10.109.143.183]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id D7FCD178CAB for ; Fri, 4 Jan 2019 14:31:09 +0100 (CET) Received: from kaod.org (lfbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player692.ha.ovh.net (Postfix) with ESMTPSA id 28C871548FF0; Fri, 4 Jan 2019 13:30:54 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Fri, 4 Jan 2019 14:30:50 +0100 Message-Id: <20190104133050.7468-1-clg@kaod.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 6925410327884303334 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrvddugdehgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 87.98.181.248 Subject: [Qemu-devel] [PATCH v2] spapr: return from post_load method when RTC import fails X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The error value can be squashed by the section handling radix migration. Simply bail out if an error occurs when the RTC offset is imported. This fixes the Coverity issue CID 1398591. Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests") Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz --- Changes since v1 : - Added Coverity issue CID hw/ppc/spapr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f1725313e979..64397ee91ef0 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1748,12 +1748,17 @@ static int spapr_post_load(void *opaque, int versio= n_id) return err; } =20 - /* In earlier versions, there was no separate qdev for the PAPR + /* + * In earlier versions, there was no separate qdev for the PAPR * RTC, so the RTC offset was stored directly in sPAPREnvironment. * So when migrating from those versions, poke the incoming offset - * value into the RTC device */ + * value into the RTC device + */ if (version_id < 3) { err =3D spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset); + if (err) { + return err; + } } =20 if (kvm_enabled() && spapr->patb_entry) { --=20 2.20.1