From patchwork Tue Oct 16 17:41:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 984892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42ZN5Q4zqwz9sBN for ; Wed, 17 Oct 2018 04:46:02 +1100 (AEDT) Received: from localhost ([::1]:59364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCTPs-0000Tz-5h for incoming@patchwork.ozlabs.org; Tue, 16 Oct 2018 13:46:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCTM8-00063c-2e for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCTM6-00007X-8i for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56422) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gCTM5-00005s-S8 for qemu-devel@nongnu.org; Tue, 16 Oct 2018 13:42:06 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14E0F308A974; Tue, 16 Oct 2018 17:42:05 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CFB405DD7E; Tue, 16 Oct 2018 17:42:04 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DC5DF1132751; Tue, 16 Oct 2018 19:41:58 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 16 Oct 2018 19:41:36 +0200 Message-Id: <20181016174158.15229-17-armbru@redhat.com> In-Reply-To: <20181016174158.15229-1-armbru@redhat.com> References: <20181016174158.15229-1-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 16 Oct 2018 17:42:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 16/38] xen/pt: Fix incomplete conversion to realize() 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: Anthony Perard , Stefano Stabellini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The conversion of "xen-pci-passthrough" to realize() (commit 5a11d0f7549, v2.6.0) neglected to convert the xen_pt_config_init() error path. If xen_pt_config_init() fails, xen_pt_realize() reports the error, then returns success without completing its job. I don't know the exact impact, but it can't be good. Belatedly convert the error path. Fixes: 5a11d0f7549e24a10e178a9dc8ff5e698031d9a6 Cc: Stefano Stabellini Cc: Anthony Perard Signed-off-by: Markus Armbruster Acked-by: Anthony PERARD --- hw/xen/xen_pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index e5a6eff44f..f1f3a3727c 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -830,7 +830,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp) xen_pt_config_init(s, &err); if (err) { error_append_hint(&err, "PCI Config space initialisation failed"); - error_report_err(err); + error_propagate(errp, err); rc = -1; goto err_out; }