From nobody Fri Nov 14 20:27:55 2025 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=1590559322; cv=none; d=zohomail.com; s=zohoarc; b=Ow+8NKNFeq7tXdeoKqgOd9TMYQa4YlFq66JDQiBobFLZTvPru2bUWXkwo9p0BX20YlnxnXK2clse2E7gQDrD3npPGMKuagtxQh0+UmuqHOvofbioZCyhw+2k9dTgTmyd1lu8dRxTYQ/LBVNURmA5UGcj8yNStJoKOdqkEzZK4VE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559322; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XMTB13MBlpQtZKdvSYzHk5QibalQ2G1E943+vWAs4eY=; b=eZyasQ/pGe5vrh0/TgugWqbDO0BfcamLMOr0/ov7cTuC1X/KUpjw2bwUfL4PVV8mA0ie+tinOOa3HQZ2fC36p1i5nIJ9XO9Xwhw9cij6Oi0sWFtBOT2TrFUH/tG+cn0zW9yyjJAGPb+rtwgurtKXsmwcF/GK0xq9iPvmNpG146s= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590559322618467.7659848582174; Tue, 26 May 2020 23:02:02 -0700 (PDT) Received: from localhost ([::1]:55202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdp8b-0004ex-3a for importer@patchew.org; Wed, 27 May 2020 02:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6Y-0002aA-Jm for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:34187 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6W-0004Dj-BL for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:53 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-460-A3Rb5X4jMaCsjM_7wsDjfg-1; Wed, 27 May 2020 01:59:49 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E51D800688; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5926719D7E; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E1F8211386A0; Wed, 27 May 2020 07:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559191; h=from:from: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; bh=XMTB13MBlpQtZKdvSYzHk5QibalQ2G1E943+vWAs4eY=; b=VbyCa3FUK0YIY/llysuD4EgXTrpkIDegi01fL93kjfOBPrNG4zA1y9HzxW4F/N76esLYnF 2URa7F3KvmqZB9UO2Jx26r1Od1LdVLU3fIvWYZ5jGW7HzKJUJKNK7k+Hh+9j7cf8OtqyQB Lu+h1ndVcnumq/Wen5AtGTSAj2l2Qpc= X-MC-Unique: A3Rb5X4jMaCsjM_7wsDjfg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 01/10] nvdimm: Plug memory leak in uuid property setter Date: Wed, 27 May 2020 07:59:36 +0200 Message-Id: <20200527055945.6774-2-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:49:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiao Guangrong , Shivaprasad G Bhat Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" nvdimm_set_uuid() leaks memory on qemu_uuid_parse() failure. Fix that. Fixes: 6c5627bb24dcd68c997857a8b671617333b1289f Cc: Xiao Guangrong Cc: Shivaprasad G Bhat Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-2-armbru@redhat.com> Tested-by: Shivaprasad G Bhat Reviewed-by: Shivaprasad G Bhat --- hw/mem/nvdimm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index c5adedcc69..76f66e0b19 100644 --- a/hw/mem/nvdimm.c +++ b/hw/mem/nvdimm.c @@ -97,7 +97,6 @@ static void nvdimm_set_uuid(Object *obj, Visitor *v, cons= t char *name, if (qemu_uuid_parse(value, &nvdimm->uuid) !=3D 0) { error_setg(errp, "Property '%s.%s' has invalid value", object_get_typename(obj), name); - goto out; } g_free(value); =20 --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559240; cv=none; d=zohomail.com; s=zohoarc; b=ee8zLmhARqnwM9XXJgl075X4JgzTJIQFbkmwZL5ZqZ+Wv8YclnqpgKLReNVtCaqqm1B2b5pwdlUqgv3qSxlWRYZ9Z68/mEkzfckWM3VDfXAxPiCQ7JkNnYZaIhtYpjKNnHWnDhzxaFSUIVtj8XK4Vnr0utFM8iMyIhjthmBLSFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559240; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j6YgtXDpCWCf9KnSRhU+LICwWG5pFJTKsR57WPE8YO4=; b=H7hPzlUn/3Jrtl636B14rlR4Vitqk2Q/Vhezj0pzYAnaW88SllESz9PenkuyMTuJKqv1qpjNB0f+MrUre1QbM1zl/Z7WYQNURxDy0tz38YtoUZfPMZYADf+vMQZXOGY2VPyQSi1/1iuxY2wEMG5faKA+K0b1wzVRDp/nLnrMpmI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1590559240286521.9673942606473; Tue, 26 May 2020 23:00:40 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jdp6e-0006WZ-42; Wed, 27 May 2020 06:00:00 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jdp6c-0006WU-OQ for xen-devel@lists.xenproject.org; Wed, 27 May 2020 05:59:59 +0000 Received: from us-smtp-delivery-1.mimecast.com (unknown [207.211.31.81]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 4959291e-9fdf-11ea-9947-bc764e2007e4; Wed, 27 May 2020 05:59:54 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-387-eEH0X-D4OE60pRaysMOMXQ-1; Wed, 27 May 2020 01:59:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 710038014D4; Wed, 27 May 2020 05:59:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C56279C5C; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E4B9E11386A3; Wed, 27 May 2020 07:59:45 +0200 (CEST) X-Inumbo-ID: 4959291e-9fdf-11ea-9947-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559194; h=from:from: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; bh=j6YgtXDpCWCf9KnSRhU+LICwWG5pFJTKsR57WPE8YO4=; b=BNJC+gRWTNmjWtGnU6/e04Eqznkr18U6q9vpb14NE3Omf+Fyr1qGwGik0VMgJdOwEezLaw ln86CzZjjd2KZ0ktGDtDlIhpzxJgrlKUeFl4Pab/NVDDbX3eZ8Q7gujQBAUDsJs3+jgvKe IZmlRakMv/skATULzEpDsOkVzeh8AG8= X-MC-Unique: eEH0X-D4OE60pRaysMOMXQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 02/10] xen: Fix and improve handling of device_add usb-host errors Date: Wed, 27 May 2020 07:59:37 +0200 Message-Id: <20200527055945.6774-3-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony Perard , xen-devel@lists.xenproject.org, Stefano Stabellini , Gerd Hoffmann , Paul Durrant Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" usbback_portid_add() leaks the error when qdev_device_add() fails. Fix that. While there, use the error to improve the error message. The qemu_opts_from_qdict() similarly leaks on failure. But any failure there is a programming error. Pass &error_abort. Fixes: 816ac92ef769f9ffc534e49a1bb6177bddce7aa2 Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Gerd Hoffmann Cc: xen-devel@lists.xenproject.org Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-3-armbru@redhat.com> Acked-by: Paul Durrant --- hw/usb/xen-usb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 961190d0f7..4d266d7bb4 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -30,6 +30,7 @@ #include "hw/usb.h" #include "hw/xen/xen-legacy-backend.h" #include "monitor/qdev.h" +#include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" =20 @@ -755,13 +756,16 @@ static void usbback_portid_add(struct usbback_info *u= sbif, unsigned port, qdict_put_int(qdict, "port", port); qdict_put_int(qdict, "hostbus", atoi(busid)); qdict_put_str(qdict, "hostport", portname); - opts =3D qemu_opts_from_qdict(qemu_find_opts("device"), qdict, &local_= err); - if (local_err) { - goto err; - } + opts =3D qemu_opts_from_qdict(qemu_find_opts("device"), qdict, + &error_abort); usbif->ports[port - 1].dev =3D USB_DEVICE(qdev_device_add(opts, &local= _err)); if (!usbif->ports[port - 1].dev) { - goto err; + qobject_unref(qdict); + xen_pv_printf(&usbif->xendev, 0, + "device %s could not be opened: %s\n", + busid, error_get_pretty(local_err)); + error_free(local_err); + return; } qobject_unref(qdict); speed =3D usbif->ports[port - 1].dev->speed; @@ -793,11 +797,6 @@ static void usbback_portid_add(struct usbback_info *us= bif, unsigned port, usbback_hotplug_enq(usbif, port); =20 TR_BUS(&usbif->xendev, "port %d attached\n", port); - return; - -err: - qobject_unref(qdict); - xen_pv_printf(&usbif->xendev, 0, "device %s could not be opened\n", bu= sid); } =20 static void usbback_process_port(struct usbback_info *usbif, unsigned port) --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559322; cv=none; d=zohomail.com; s=zohoarc; b=SMTxyUkz9Wz1ZJGx0oHKgJis08kPAYFoDTF7ijENpENwaNYw7wo48cRtgktzw9e8UvI/Cd45/CFowARVKNRSQI8KgtIPd4MVYG+NtMv54NCR1kanfNIm4E5PN1llwpS01ZxhqU32qq3EYIR46Yc/QUwCZcJIndri5Gkf/o/gji0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559322; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Iu2hVa8OYXTsFCh4dFJHjFuoB7UaUJNnIBrvxpNFRUU=; b=S74CGeCRKeJ6+NaJ22v/GHsQ1Vio/PkTIGzqkcJm8vg9QbX6Y+k080gni9cdedxpBlK4X37yI6DwOch2STAiqczeW7oBk2BHLSYbjdEWMF41lXV4Aa7zUaxULDLOHG66uvnfCvPRSalffkBKgWvkQZun5h7yW1FBzWL2WcQ2pwk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159055932276628.397979262608487; Tue, 26 May 2020 23:02:02 -0700 (PDT) Received: from localhost ([::1]:55180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdp8b-0004ec-CW for importer@patchew.org; Wed, 27 May 2020 02:02:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6Z-0002aP-EO for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20910 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004Fd-SA for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:55 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-471-C7A0SCKuOP2wvvgT1p6FNg-1; Wed, 27 May 2020 01:59:51 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 71E4F107ACCA for ; Wed, 27 May 2020 05:59:50 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71AD798A3F; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E823511385E2; Wed, 27 May 2020 07:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559193; h=from:from: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; bh=Iu2hVa8OYXTsFCh4dFJHjFuoB7UaUJNnIBrvxpNFRUU=; b=UrqFc4hw6RXUjHWdXLD8B1Ebtef6L+WXAXAeQWzQ+x1kzgZHH8ka6v3f2qwPzFUUkFqs7+ NlVV1+N7tYmroJ07MI9wpAzkZkWWxJyll8O8VL2JDqiy2b+uYcMWrO6JZKSDEHAGNpW0NB 6zvZdyZkWpFu7L5tiFqDxo5n4zSENdg= X-MC-Unique: C7A0SCKuOP2wvvgT1p6FNg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 03/10] s390x/cpumodel: Fix harmless misuse of visit_check_struct() Date: Wed, 27 May 2020 07:59:38 +0200 Message-Id: <20200527055945.6774-4-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 01:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , David Hildenbrand Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Commit e47970f51d "s390x/cpumodel: Fix query-cpu-model-FOO error API violations" neglected to change visit_check_struct()'s Error ** argument along with the others. If visit_check_struct() failed, we'd take the success path. Fortunately, it can't fail here: qobject_input_check_struct() checks we consumed the whole dictionary, and to get here, we did. Fix it anyway. Cc: David Hildenbrand Cc: Cornelia Huck Signed-off-by: Markus Armbruster Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Message-Id: <20200505101908.6207-4-armbru@redhat.com> --- target/s390x/cpu_models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 8efe6ed514..2fa609bffe 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -524,7 +524,7 @@ static void cpu_model_from_info(S390CPUModel *model, co= nst CpuModelInfo *info, } } if (!err) { - visit_check_struct(visitor, errp); + visit_check_struct(visitor, &err); } visit_end_struct(visitor, NULL); visit_free(visitor); --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 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=1590559423; cv=none; d=zohomail.com; s=zohoarc; b=i6ceVGSj6UIobPfb2ilqFb2UzZ6kjQyzUxRxdaLGqJ/7RsD/SjVsmvGE41OA9gV7mp0wWOBGW1x7B6/OO5PGvb1/WSMX7oIafwcplfJ2kOKv3TFqGYqmVj31E+LLOW/DwAaDIsalU8m/kvppXzGivxNtTv+ND2qp+7qu54t9TO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559423; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IUSx1PDDw1vfrD4MhZ65qLeCnCHCsk5cDCIAJTQGhZE=; b=Q0LXQDTEtwRPlaLB0BlT8Ocd40SS/OvG0zjAd63lySVInKhXndaO0E3/gw3+e+2T2KwlVKEyV6JIDfEk3TwH9uwQnExPA3W5aTNyNIFY48lJ3r5W0gBr2oLB6sS3Bk4r6GJE79MmamaNW26O4259nJ/z7YJGNbydbc/Pk8nEfBc= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159055942345362.77175257004944; Tue, 26 May 2020 23:03:43 -0700 (PDT) Received: from localhost ([::1]:34556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdpAE-00083Z-86 for importer@patchew.org; Wed, 27 May 2020 02:03:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6d-0002bj-Mz for qemu-devel@nongnu.org; Wed, 27 May 2020 02:00:00 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:42057 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6W-0004De-D5 for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:59 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-fFAaWCihO-GcT31r5XCh-g-1; Wed, 27 May 2020 01:59:48 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F3A480183C for ; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 714321A7D2; Wed, 27 May 2020 05:59:47 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id EB5B41138611; Wed, 27 May 2020 07:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559191; h=from:from: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; bh=IUSx1PDDw1vfrD4MhZ65qLeCnCHCsk5cDCIAJTQGhZE=; b=UC18nEU921LmCIFPPOHeAgtU/XcY/typVfDynnqgtN+WdGKtKdH8/e6gwLiL+xzIEI6HfT Eu/FeUVCkVegJyxZ5KtdV5pw2FQ/AE9gydF6r/o+AVKwiH1Za6zqLUj8U+o4dkLM9z7I4d SzhnXq3/K1azcAVOYg6fwHeyG+g7Eh8= X-MC-Unique: fFAaWCihO-GcT31r5XCh-g-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 04/10] tests/migration: Tighten error checking Date: Wed, 27 May 2020 07:59:39 +0200 Message-Id: <20200527055945.6774-5-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=205.139.110.61; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/26 22:58:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) migrate_get_socket_address() neglects to check visit_type_SocketAddressList() failure. This smells like a leak, but it actually will crash dereferencing @addrs. Pass &error_abort to remove the code smell. Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-5-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/qtest/migration-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 2568c9529c..dc3490c9fa 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" =20 #include "libqtest.h" +#include "qapi/error.h" #include "qapi/qmp/qdict.h" #include "qemu/module.h" #include "qemu/option.h" @@ -301,7 +302,6 @@ static char *migrate_get_socket_address(QTestState *who= , const char *parameter) { QDict *rsp; char *result; - Error *local_err =3D NULL; SocketAddressList *addrs; Visitor *iv =3D NULL; QObject *object; @@ -310,7 +310,7 @@ static char *migrate_get_socket_address(QTestState *who= , const char *parameter) object =3D qdict_get(rsp, parameter); =20 iv =3D qobject_input_visitor_new(object); - visit_type_SocketAddressList(iv, NULL, &addrs, &local_err); + visit_type_SocketAddressList(iv, NULL, &addrs, &error_abort); visit_free(iv); =20 /* we are only using a single address */ --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559535; cv=none; d=zohomail.com; s=zohoarc; b=kxjPxskEiNkyvnYbWVQKKa944JXoMq7nE5I6wAqvhrccjslmzr2lDZwLxPrZp5DuxjuAPYIOurzEi6aQ4UOTrjLlO7djVm/C8Dc7V4SIQjL8Yfl5pee+MdBi7jAPw2DkHNUYju2cjWS0E/OYyuYTzf2xRfwccb0NaTOptq2X1gg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559535; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bpvpcuEGOqp5VHCVEPcPDdZOHjY9q7vpnxF50Uyhw6Q=; b=EYn/PJgm/g8D1h5/iYe+Y7SF4xBOl4lzywBeRckUN8YAuIfWBc+yJXqpQ7hpIuMPSaGyMozR3FxUxM2nK5TSYWLUOfj0EAyDFw+mUW2nPniqmUvOrEUbBZfp+iMqbN8tV4m12H0Am8pFfrgTksc49Zsv7EY6FlTQzNoGjFddKIE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590559535420732.0964455416412; Tue, 26 May 2020 23:05:35 -0700 (PDT) Received: from localhost ([::1]:40814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdpC2-0002AX-6z for importer@patchew.org; Wed, 27 May 2020 02:05:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6b-0002ac-85 for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52918 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004Ef-TC for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:56 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-sqApCiexPgWQXDyTbFNUtw-1; Wed, 27 May 2020 01:59:50 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58A2C1855A0C for ; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 046C07A1E1; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id EF62E113639D; Wed, 27 May 2020 07:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=bpvpcuEGOqp5VHCVEPcPDdZOHjY9q7vpnxF50Uyhw6Q=; b=VdZSCaY8oktsEgnF5Df/rAP34QjPXIM68yD/B+/YZB+2g+MEpix2eUGr2a1R5hEP/dqNLh 1YbkLa8Gc/VdYZGQygvNSyRkAJjgJpUBhsp2Qz3RxG3YRPMfUFRo4FqZpQ2YtVtwAWI1nQ ydnXwJR8swIKejcjb0i/pn/J05Hnono= X-MC-Unique: sqApCiexPgWQXDyTbFNUtw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 05/10] error: Use error_reportf_err() where appropriate Date: Wed, 27 May 2020 07:59:40 +0200 Message-Id: <20200527055945.6774-6-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 01:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Replace error_report("...: %s", ..., error_get_pretty(err)); by error_reportf_err(err, "...: ", ...); One of the replaced messages lacked a colon. Add it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200505101908.6207-6-armbru@redhat.com> --- chardev/char-socket.c | 5 +++-- hw/sd/pxa2xx_mmci.c | 4 ++-- hw/sd/sd.c | 4 ++-- hw/usb/dev-mtp.c | 9 +++++---- qemu-nbd.c | 7 +++---- scsi/qemu-pr-helper.c | 4 ++-- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index e77699db48..db253d4024 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -138,8 +138,9 @@ static void check_report_connect_error(Chardev *chr, SocketChardev *s =3D SOCKET_CHARDEV(chr); =20 if (!s->connect_err_reported) { - error_report("Unable to connect character device %s: %s", - chr->label, error_get_pretty(err)); + error_reportf_err(err, + "Unable to connect character device %s: ", + chr->label); s->connect_err_reported =3D true; } qemu_chr_socket_restart_timer(chr); diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c index 8f9ab0ec16..f9c50ddda5 100644 --- a/hw/sd/pxa2xx_mmci.c +++ b/hw/sd/pxa2xx_mmci.c @@ -497,12 +497,12 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysme= m, carddev =3D qdev_create(qdev_get_child_bus(dev, "sd-bus"), TYPE_SD_CAR= D); qdev_prop_set_drive(carddev, "drive", blk, &err); if (err) { - error_report("failed to init SD card: %s", error_get_pretty(err)); + error_reportf_err(err, "failed to init SD card: "); return NULL; } object_property_set_bool(OBJECT(carddev), true, "realized", &err); if (err) { - error_report("failed to init SD card: %s", error_get_pretty(err)); + error_reportf_err(err, "failed to init SD card: "); return NULL; } =20 diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 71a9af09ab..3c06a0ac6d 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -703,13 +703,13 @@ SDState *sd_init(BlockBackend *blk, bool is_spi) dev =3D DEVICE(obj); qdev_prop_set_drive(dev, "drive", blk, &err); if (err) { - error_report("sd_init failed: %s", error_get_pretty(err)); + error_reportf_err(err, "sd_init failed: "); return NULL; } qdev_prop_set_bit(dev, "spi", is_spi); object_property_set_bool(obj, true, "realized", &err); if (err) { - error_report("sd_init failed: %s", error_get_pretty(err)); + error_reportf_err(err, "sd_init failed: "); return NULL; } =20 diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 20717f026b..168428156b 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -631,8 +631,9 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObje= ct *o) int64_t id =3D qemu_file_monitor_add_watch(s->file_monitor, o->pat= h, NULL, file_monitor_event, s, &e= rr); if (id =3D=3D -1) { - error_report("usb-mtp: failed to add watch for %s: %s", o->pat= h, - error_get_pretty(err)); + error_reportf_err(err, + "usb-mtp: failed to add watch for %s: ", + o->path); error_free(err); } else { trace_usb_mtp_file_monitor_event(s->dev.addr, o->path, @@ -1276,8 +1277,8 @@ static void usb_mtp_command(MTPState *s, MTPControl *= c) =20 s->file_monitor =3D qemu_file_monitor_new(&err); if (err) { - error_report("usb-mtp: file monitoring init failed: %s", - error_get_pretty(err)); + error_reportf_err(err, + "usb-mtp: file monitoring init failed: "); error_free(err); } else { QTAILQ_INIT(&s->events); diff --git a/qemu-nbd.c b/qemu-nbd.c index 306e44fb0a..d2657b8db5 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -856,8 +856,7 @@ int main(int argc, char **argv) } tlscreds =3D nbd_get_tls_creds(tlscredsid, list, &local_err); if (local_err) { - error_report("Failed to get TLS creds %s", - error_get_pretty(local_err)); + error_reportf_err(local_err, "Failed to get TLS creds: "); exit(EXIT_FAILURE); } } else { @@ -983,8 +982,8 @@ int main(int argc, char **argv) &local_err); if (sioc =3D=3D NULL) { object_unref(OBJECT(server)); - error_report("Failed to use socket activation: %s", - error_get_pretty(local_err)); + error_reportf_err(local_err, + "Failed to use socket activation: "); exit(EXIT_FAILURE); } qio_net_listener_add(server, sioc); diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index 181ed4a186..57ad830d54 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -1030,8 +1030,8 @@ int main(int argc, char **argv) server_ioc =3D qio_channel_socket_new_fd(FIRST_SOCKET_ACTIVATION_F= D, &local_err); if (server_ioc =3D=3D NULL) { - error_report("Failed to use socket activation: %s", - error_get_pretty(local_err)); + error_reportf_err(local_err, + "Failed to use socket activation: "); exit(EXIT_FAILURE); } } --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559424; cv=none; d=zohomail.com; s=zohoarc; b=No0ZR9CnBIWdSlwPKRQvFGhxf0O7SbJlrcKzAr97ctOTELGl18MjWRFXxpp5POQGvOCQPcUYQuJ7/oqEYyTvDMZoTkzMP/582cRSO3Bd4UI4lGCPEjHaTZHKZK4AMNRoneE45S2+GPuRby+RAofQU8WQjii0Aj3EPIlhq0Kj+aI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559424; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=46gaA4Ltz31a0m02NZS287O+Cnk6f/gXH/ch/lV4dj0=; b=DOfkPWdDtZ9elbLzdEBkifrYO03vyh76fhuk71HnOwBmpW/jDogzetTlYDzE0Q1AYal+qLL3JuF/LkWr1tm++NUcQ4TpEk+NLpgWGn2QWp3A53IOHqXyNbr5ZWRsGLM6z8LhXEOHPKgFVOM/yzuF3N67rB5U/F9yhS9NEtxlElQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590559424879285.9981304252127; Tue, 26 May 2020 23:03:44 -0700 (PDT) Received: from localhost ([::1]:34648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdpAF-00085h-Ms for importer@patchew.org; Wed, 27 May 2020 02:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6b-0002ap-OL for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:40610 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004Ex-NO for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-CMHdOuYzPv-zAfUjZgxEdw-1; Wed, 27 May 2020 01:59:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E637800053; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0667C5C1B0; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id F2BAF11358BC; Wed, 27 May 2020 07:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=46gaA4Ltz31a0m02NZS287O+Cnk6f/gXH/ch/lV4dj0=; b=KLry3Cg2bvm83rAhqXSQVBx0ST3WYxKOwXfFdMthCqMdbgnhggMdhbWMZp5l84w9nJ8h/Y 0t85nf++Opwz0zrwv8KPJ+83WDp7xDsh2k1uRkO9wsrHHL4c/qfM5bOIoA8s0WsX3YSJ0c LUH/XmG/88dBLcwuQeStcVyrrWzt3Ns= X-MC-Unique: CMHdOuYzPv-zAfUjZgxEdw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 06/10] mips/malta: Fix create_cps() error handling Date: Wed, 27 May 2020 07:59:41 +0200 Message-Id: <20200527055945.6774-7-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=207.211.31.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 01:25:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Markovic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second create_cps() is wrong that way. The last calls treats an error as fatal. Do that for the prior ones, too. Fixes: bff384a4fbd5d0e86939092e74e766ef0f5f592c Cc: Aleksandar Markovic Cc: "Philippe Mathieu-Daud=C3=A9" Cc: Aurelien Jarno Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200505101908.6207-7-armbru@redhat.com> Reviewed-by: Aleksandar Markovic --- hw/mips/mips_malta.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index e4c4de1b4e..17bf41616b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1185,17 +1185,14 @@ static void create_cpu_without_cps(MachineState *ms, static void create_cps(MachineState *ms, MaltaState *s, qemu_irq *cbus_irq, qemu_irq *i8259_irq) { - Error *err =3D NULL; - sysbus_init_child_obj(OBJECT(s), "cps", OBJECT(&s->cps), sizeof(s->cps= ), TYPE_MIPS_CPS); - object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", &er= r); - object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", &err); - object_property_set_bool(OBJECT(&s->cps), true, "realized", &err); - if (err !=3D NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", + &error_fatal); + object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", + &error_fatal); + object_property_set_bool(OBJECT(&s->cps), true, "realized", + &error_fatal); =20 sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); =20 --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 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=1590559609; cv=none; d=zohomail.com; s=zohoarc; b=lLvesss7MqVAgHV8Y7FsGIZEUO+gpGyCBTUrrav0aq/p2HEByxAJBuahyb7WAfSsU0LPLirFnnicEWTQ/eP/+ZipXudPj8sd3Vw1LBP9HeLDQ6N+vbvjZ/fciph3fTziywNRsSFbtJfi7emzyayobgZImuOa6plcq4MwIxSPHKM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559609; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Iop54lm0wJKDvXW3bGCzNylCDOWFU7ilRFi9qRAVZC8=; b=HiY12Q3+YI7koyYqMsifFpfaLHO272Yem0pXcMobCcA0XaumynVYV2z1q/mtpSLHLXTM/Hnn3FQ8I+kJLHeMnC8dhFHPN6qM8TxBVpBimNL7a+lqfvy9lzuJBN1M2xnuRQtquSZHUbbkLXdNnKWCXMV2su+WOAkjzAZqw9VXuxE= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590559609479406.03324166057735; Tue, 26 May 2020 23:06:49 -0700 (PDT) Received: from localhost ([::1]:45356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdpDE-00043l-A6 for importer@patchew.org; Wed, 27 May 2020 02:06:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6b-0002am-JA for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:58 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:26107 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004FH-R1 for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-OIsVLHqwMbC0fgXurtD8ag-1; Wed, 27 May 2020 01:59:50 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 75AE1460; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 04C2119D7E; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 01E6D11358BE; Wed, 27 May 2020 07:59:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=Iop54lm0wJKDvXW3bGCzNylCDOWFU7ilRFi9qRAVZC8=; b=bA8oB6LLCTZov6weyTI69ifhgm1ZgM04rzhpMOzCpyjDDblYb0gIE3yp2c4HLanM5pMwz6 VUmbvtr55jt93v4pm13eePFrD1gUSer3U0M23G/9fB0O4vaNk2sPYQ59skDRyeq3gh/hUs NxSg+tiu1yjPpYfLGrjDptVcPMafr5U= X-MC-Unique: OIsVLHqwMbC0fgXurtD8ag-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 07/10] mips/boston: Fix boston_mach_init() error handling Date: Wed, 27 May 2020 07:59:42 +0200 Message-Id: <20200527055945.6774-8-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:45:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Burton , Aleksandar Rikalo , Aleksandar Markovic Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. boston_mach_init() is wrong that way. The last calls treats an error as fatal. Do that for the prior ones, too. Fixes: df1d8a1f29f567567b9d20be685a4241282e7005 Cc: Paul Burton Cc: Aleksandar Rikalo Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-8-armbru@redhat.com> Reviewed-by: Aleksandar Markovic --- hw/mips/boston.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 98ecd25e8e..2832dfa6ae 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -458,14 +458,11 @@ static void boston_mach_init(MachineState *machine) sysbus_init_child_obj(OBJECT(machine), "cps", OBJECT(&s->cps), sizeof(s->cps), TYPE_MIPS_CPS); object_property_set_str(OBJECT(&s->cps), machine->cpu_type, "cpu-type", - &err); - object_property_set_int(OBJECT(&s->cps), machine->smp.cpus, "num-vp", = &err); - object_property_set_bool(OBJECT(&s->cps), true, "realized", &err); - - if (err !=3D NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + &error_fatal); + object_property_set_int(OBJECT(&s->cps), machine->smp.cpus, "num-vp", + &error_fatal); + object_property_set_bool(OBJECT(&s->cps), true, "realized", + &error_fatal); =20 sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); =20 --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 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=1590559328; cv=none; d=zohomail.com; s=zohoarc; b=MdbbKe3C+FqpZAoRqibx6vLv7gQfDXM+2Sigu/nRmkQbSiD3h9+CHY2UZD3ushvjROZ1m7FdUGRhnpE8MXiQ8cdDQBEhCTfQh7eNBrF1VYDyXIP0hCDqYT9AyoQl8C1QRQaybr2OcGf6dVmye7Xk4sPDG9ZzpPnKSlhAv36jr00= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559328; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ihIWWgHgIVEr1v+IWGigUbLF1MmjonVuW9yyX8//GSY=; b=bcJ/N5HB7yNivxfGVIQ79wCY6cvq1IXonEQJI7iXXvx9mkp+59aaDBBi4M3Pyb6UuUNvm4YbWLg+vIJAE2SknlrZTt/KAS12r8x0AHOLl6+Q+sVkGgNfH/BvcBrCjlgwwWJz9okU5FtcR6q0TayNDy/WVwVysXmzbZiF8RNyoKY= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590559328196315.2767374165329; Tue, 26 May 2020 23:02:08 -0700 (PDT) Received: from localhost ([::1]:55416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdp8g-0004kU-Tf for importer@patchew.org; Wed, 27 May 2020 02:02:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6c-0002bI-AM for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:58 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:41818 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004Ed-NG for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:57 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-490-6QaU5fLZNxiuDvaNTSeIAg-1; Wed, 27 May 2020 01:59:50 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68D86100A8E7; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 047795D9E7; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0525111358BF; Wed, 27 May 2020 07:59:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=ihIWWgHgIVEr1v+IWGigUbLF1MmjonVuW9yyX8//GSY=; b=cTpOvhEVq6aztYzwE78GaR6zMrsfmgnL2T5HBcrkEe9iNYsAatyboByJy3y/hcR2E6u8yO 0Sfe+9TmfqppX1MSWdS2tTeXwbOpXq2CAVJvLxC+L//ZPcNMYoTi4BlhxP8pQjLTKufZSe /E0vxWmdXAZ2dceGhXfLRRQSovPPcfQ= X-MC-Unique: 6QaU5fLZNxiuDvaNTSeIAg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 08/10] mips/boston: Plug memory leak in boston_mach_init() Date: Wed, 27 May 2020 07:59:43 +0200 Message-Id: <20200527055945.6774-9-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:49:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Burton , Aleksandar Rikalo , Aleksandar Markovic Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Fixes: df1d8a1f29f567567b9d20be685a4241282e7005 Cc: Paul Burton Cc: Aleksandar Rikalo Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-9-armbru@redhat.com> Reviewed-by: Aleksandar Markovic --- hw/mips/boston.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index 2832dfa6ae..a896056be1 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -426,7 +426,6 @@ static void boston_mach_init(MachineState *machine) { DeviceState *dev; BostonState *s; - Error *err =3D NULL; MemoryRegion *flash, *ddr_low_alias, *lcd, *platreg; MemoryRegion *sys_mem =3D get_system_memory(); XilinxPCIEHost *pcie2; @@ -467,7 +466,8 @@ static void boston_mach_init(MachineState *machine) sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); =20 flash =3D g_new(MemoryRegion, 1); - memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB, &err); + memory_region_init_rom(flash, NULL, "boston.flash", 128 * MiB, + &error_fatal); memory_region_add_subregion_overlap(sys_mem, 0x18000000, flash, 0); =20 memory_region_add_subregion_overlap(sys_mem, 0x80000000, machine->ram,= 0); --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559538; cv=none; d=zohomail.com; s=zohoarc; b=KqSPHeapV1flFxaSL0AERE5jowIquwTdOteu1dn9ya7xS+gq1itgm0hPv3BS4PfInS/8FZkliBLqJA2SxNPX6TVLKPNDyzAj3/Ww6VG6tS80R5iY3MHYK1LRaOyQGOiCQaQC+uVLxXNLikBIf0FYRCtbyfJOzGQAtUy+zfUTbwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559538; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/ZP0qJvOwAC4h1HCMRaDbDRJbB+KSn/nLPEOMovO5Cs=; b=nKARCOG1dh1f4EV8rAmsXQwNGBy8RyO8EKch8DfHMnWrsk2DrXtwerSV9mRpxF7HcZ5y2DPrFyAWDEUVO/tJCBhweBPjQEx9G8S/7v7KTEJ5elmNrcKTEhAKroe9rY08xe9yxXHpVQtKbn7oLu+MtO4GCY/Tq8Ay4FxaOeyVydI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159055953895521.32630050452576; Tue, 26 May 2020 23:05:38 -0700 (PDT) Received: from localhost ([::1]:41158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdpC5-0002Iq-Pt for importer@patchew.org; Wed, 27 May 2020 02:05:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6d-0002bW-3j for qemu-devel@nongnu.org; Wed, 27 May 2020 02:00:00 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:41525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004F1-Sx for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:58 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-phsY-FpCNqSgX9IDqPgYaw-1; Wed, 27 May 2020 01:59:50 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 685FA1005512; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 064565D9E8; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0869411358C0; Wed, 27 May 2020 07:59:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=/ZP0qJvOwAC4h1HCMRaDbDRJbB+KSn/nLPEOMovO5Cs=; b=fj7lst8P4PsdsgMokekIJNeZ0CvqOkq69M+UyLVUKHsdj4sP0+Tm6Y+AO+N9Ul+lcuo3oP CLqDATK4i764Jxd0710exmVYiQkCY31jih2ey9gex8Rfm9Ptp0qqNtMo1Hg1AvKdmcUiiN OPrz8R/4l7r5mRBs0i2CrkZj4Pka9wU= X-MC-Unique: phsY-FpCNqSgX9IDqPgYaw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 09/10] arm/sabrelite: Consistently use &error_fatal in sabrelite_init() Date: Wed, 27 May 2020 07:59:44 +0200 Message-Id: <20200527055945.6774-10-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=207.211.31.81; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:45:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jean-Christophe Dubois Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Cc: Peter Maydell Cc: Jean-Christophe Dubois Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200505101908.6207-10-armbru@redhat.com> [Straightforward conflict with resolved d2623129a7 "qom: Drop parameter @errp of object_property_add() & friends"] --- hw/arm/sabrelite.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/arm/sabrelite.c b/hw/arm/sabrelite.c index 6f0e233d77..96cb30aa3c 100644 --- a/hw/arm/sabrelite.c +++ b/hw/arm/sabrelite.c @@ -41,7 +41,6 @@ static void sabrelite_reset_secondary(ARMCPU *cpu, static void sabrelite_init(MachineState *machine) { FslIMX6State *s; - Error *err =3D NULL; =20 /* Check the amount of memory is compatible with the SOC */ if (machine->ram_size > FSL_IMX6_MMDC_SIZE) { @@ -52,11 +51,7 @@ static void sabrelite_init(MachineState *machine) =20 s =3D FSL_IMX6(object_new(TYPE_FSL_IMX6)); object_property_add_child(OBJECT(machine), "soc", OBJECT(s)); - object_property_set_bool(OBJECT(s), true, "realized", &err); - if (err !=3D NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + object_property_set_bool(OBJECT(s), true, "realized", &error_fatal); =20 memory_region_add_subregion(get_system_memory(), FSL_IMX6_MMDC_ADDR, machine->ram); --=20 2.21.3 From nobody Fri Nov 14 20:27:55 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1590559322; cv=none; d=zohomail.com; s=zohoarc; b=Ck5XGX7ONRQepj+ww/nQD4biq+aGXvDVc4tba/bLxZJo85uUb6HAYMPnHVs2NEchdJgphiNVUkjXyez6UNxIjFY32bkG1Br85BvNCmxEpm5lL2czjLUkPSmr7Eo+I6u/aHlYsPnmhBhEoYkHQ4ftXFOPxeyFZi4ADi3LAGWJfzs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590559322; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zFFO/S/9pY3J4o3RTDNJU5p3lZ1X88+VrmeEvaoB8Ko=; b=lCagwTGwGWxIiXwwMt4M45djUQH6nRxVfurGAuPM81NOBM8+f7w7gWEyM0yNg6DGxIyU/9YF363B91XK0nohlLWrihWtYv2Dl4Su3C7PfGFrJAc5IbX0TkcLYVHAgokorPhCDZwEs066ypbWo/+TSCm8VRLla88tg3Tp46oMFmo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15905593223161017.685581374405; Tue, 26 May 2020 23:02:02 -0700 (PDT) Received: from localhost ([::1]:55160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdp8a-0004e7-6S for importer@patchew.org; Wed, 27 May 2020 02:02:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdp6Y-0002aF-NQ for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:55 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28327 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jdp6X-0004Eb-OL for qemu-devel@nongnu.org; Wed, 27 May 2020 01:59:54 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-400-HrUoReIqOwOxSQu-d5kPgQ-1; Wed, 27 May 2020 01:59:50 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3A5F21855A01; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0A7675D9EF; Wed, 27 May 2020 05:59:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0BAFB11358C2; Wed, 27 May 2020 07:59:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590559192; h=from:from: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; bh=zFFO/S/9pY3J4o3RTDNJU5p3lZ1X88+VrmeEvaoB8Ko=; b=H61GpkQBbRv4/F9VPwjAZdyot7WQamiQmAwghGhsGJaASQCZW0DxC9JtX07XE1sw5p9Q0b iXpPmsazQ3/+Q9zXncYYT+X80Fy1ZN4d2BkRf4JyZfLo6ebYqklbmxwY9zKbLhE4wKkfkX HWjcRAFeJrdafLoiBDJVFagGtTXienQ= X-MC-Unique: HrUoReIqOwOxSQu-d5kPgQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 10/10] i386: Fix x86_cpu_load_model() error API violation Date: Wed, 27 May 2020 07:59:45 +0200 Message-Id: <20200527055945.6774-11-armbru@redhat.com> In-Reply-To: <20200527055945.6774-1-armbru@redhat.com> References: <20200527055945.6774-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.120; envelope-from=armbru@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 00:49:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. x86_cpu_load_model() is wrong that way. Harmless, because its @errp is always &error_abort. To fix, cut out the @errp middleman. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Markus Armbruster Message-Id: <20200505101908.6207-11-armbru@redhat.com> --- target/i386/cpu.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 7a4a8e3847..3733d9a279 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5078,7 +5078,7 @@ static void x86_cpu_apply_version_props(X86CPU *cpu, = X86CPUModel *model) =20 /* Load data from X86CPUDefinition into a X86CPU object */ -static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model, Error **er= rp) +static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model) { X86CPUDefinition *def =3D model->cpudef; CPUX86State *env =3D &cpu->env; @@ -5092,13 +5092,19 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUM= odel *model, Error **errp) */ =20 /* CPU models only set _minimum_ values for level/xlevel: */ - object_property_set_uint(OBJECT(cpu), def->level, "min-level", errp); - object_property_set_uint(OBJECT(cpu), def->xlevel, "min-xlevel", errp); + object_property_set_uint(OBJECT(cpu), def->level, "min-level", + &error_abort); + object_property_set_uint(OBJECT(cpu), def->xlevel, "min-xlevel", + &error_abort); =20 - object_property_set_int(OBJECT(cpu), def->family, "family", errp); - object_property_set_int(OBJECT(cpu), def->model, "model", errp); - object_property_set_int(OBJECT(cpu), def->stepping, "stepping", errp); - object_property_set_str(OBJECT(cpu), def->model_id, "model-id", errp); + object_property_set_int(OBJECT(cpu), def->family, "family", + &error_abort); + object_property_set_int(OBJECT(cpu), def->model, "model", + &error_abort); + object_property_set_int(OBJECT(cpu), def->stepping, "stepping", + &error_abort); + object_property_set_str(OBJECT(cpu), def->model_id, "model-id", + &error_abort); for (w =3D 0; w < FEATURE_WORDS; w++) { env->features[w] =3D def->features[w]; } @@ -5135,7 +5141,8 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUMod= el *model, Error **errp) vendor =3D host_vendor; } =20 - object_property_set_str(OBJECT(cpu), vendor, "vendor", errp); + object_property_set_str(OBJECT(cpu), vendor, "vendor", + &error_abort); =20 x86_cpu_apply_version_props(cpu, model); } @@ -6975,7 +6982,7 @@ static void x86_cpu_initfn(Object *obj) object_property_add_alias(obj, "sse4_2", obj, "sse4.2"); =20 if (xcc->model) { - x86_cpu_load_model(cpu, xcc->model, &error_abort); + x86_cpu_load_model(cpu, xcc->model); } } =20 --=20 2.21.3