From nobody Fri Nov 14 12:16:09 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=1588674370; cv=none; d=zohomail.com; s=zohoarc; b=EKc6lMRrkrs+BCMu/OGdVSB70+3DcSeCanPtbTSydPy+OsxwVj3uBLhtWgZ5VHCc3/CRE4KgjWgYD6eoUEoFp9t0VfzKfBRk947tU7jJ7dNK8LBPYBNEd5amloICrSJtupRhtMLKZFb+E8NpgYLYYe7IPDkP8/lmA72GCMjCMGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674370; 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=IiECJHG8o11LVFxA1H6ChVLhXqD1MUnm0fYZe+ffd2c=; b=RZtAe5SCkyQZ6wxoqTxzPvxMu/7VU+4+mjJifKH87jZpD/giXcAJxPutCAb6iXnfLxD58AaztucFgaYbsuK4pbPWhq9TIp/FpBP0jxWtExmHvdl6Senw1/HpdPXt5zVfqfjKa4a74ZeUGvjXO6EKAAB/dDj/i7VahPxqUTpAcdE= 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 1588674370304480.11673040961637; Tue, 5 May 2020 03:26:10 -0700 (PDT) Received: from localhost ([::1]:56884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVum9-0006tZ-0W for importer@patchew.org; Tue, 05 May 2020 06:26:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufV-0003iL-Io for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31385 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 1jVufU-00081r-PK for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -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-441-iLUC9RywM-WGHrJg_pqsRg-1; Tue, 05 May 2020 06:19:11 -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 7069980183C; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 42A9D63F90; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C6D9D11358BD; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673956; 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=IiECJHG8o11LVFxA1H6ChVLhXqD1MUnm0fYZe+ffd2c=; b=Jk8yISnl3f9kdXYFlEAxcOYKrALbEogSKiqGsQwGqQnGaZVkAMI1dIie6Q4YtqB7pL0vCA cHEIkfcoukxl+gAFxLUl042Pn4g5abDxQhk86UJEgdKe34RoEAmpO8nEhofowOgT1CCbcD w8lkwwgbSj9X9IdReic3eE0PKRaYKnk= X-MC-Unique: iLUC9RywM-WGHrJg_pqsRg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 01/10] nvdimm: Plug memory leak in uuid property setter Date: Tue, 5 May 2020 12:18:59 +0200 Message-Id: <20200505101908.6207-2-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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 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/05 00:37:38 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: 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 Reviewed-by: Shivaprasad G Bhat Tested-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 8e426d24bb..d5752f7bf6 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.1 From nobody Fri Nov 14 12:16:09 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=1588673987; cv=none; d=zohomail.com; s=zohoarc; b=YpDQwXlmft5kvsH13HztAybaHHRGLYbrf36LZFY5DEOfZTewV+v/fvupbDNRgJjNmgKNGoEG+uq5ee95VDVWPUxtjoVU89CS0OIJSRuPn5crWT18GJNFVOvdOX1FwOIP8jgaRSu+5vmoteVXvn/5x5kCHIoKTd2KrDD454C5HRU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588673987; 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=1P/5QYytElvztL4q85MDX6gLDmepTUOXbdNhCTBxhz4=; b=fVXph/zt2NazYDlS/2og15SYejgPkPMJbvxC3F1CX//wwyc5/di4pdsq22Ct/oezGyOs7hxOsxoUccueApsA9vvXyU5pnwMmW51Hy06Yk2cKefOP/SbAMZXYLpo9Ecyci3AH2biDwOdfM8uPyykPvKd65HSS+zAWb17QoSTbluA= 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 158867398729178.53541571041148; Tue, 5 May 2020 03:19:47 -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 1jVufa-0006ni-89; Tue, 05 May 2020 10:19:22 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jVufZ-0006nd-Ag for xen-devel@lists.xenproject.org; Tue, 05 May 2020 10:19:21 +0000 Received: from us-smtp-1.mimecast.com (unknown [205.139.110.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id e179ae27-8eb9-11ea-9da1-12813bfff9fa; Tue, 05 May 2020 10:19:19 +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-260-2AN3aTbAPjeur6A4AMgvKQ-1; Tue, 05 May 2020 06:19:14 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FA98107ACCD; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 48EAE627D9; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C9E3D11358BE; Tue, 5 May 2020 12:19:08 +0200 (CEST) X-Inumbo-ID: e179ae27-8eb9-11ea-9da1-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673959; 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=1P/5QYytElvztL4q85MDX6gLDmepTUOXbdNhCTBxhz4=; b=GR15LwTL3fnshm0QX/LZNScTDuQjZ4cBRQR6TS9LmWbGPXHWy4Z99bfh3ZLv34MDK+jpNV 1QliD0BfZTFNVCsMI0/iu7Lc2zGTPv39F6OpmL7jG3xNhrgDX5a3ttq5jGiLd9UZvWIJNR QH1f818apt5zk8bZ/oRaVhqDAt8qNz0= X-MC-Unique: 2AN3aTbAPjeur6A4AMgvKQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 02/10] xen: Fix and improve handling of device_add usb-host errors Date: Tue, 5 May 2020 12:19:00 +0200 Message-Id: <20200505101908.6207-3-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 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.1 From nobody Fri Nov 14 12:16:09 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=1588674248; cv=none; d=zohomail.com; s=zohoarc; b=IkyRakKcMtmaus1LyIAe1B2TQpoSSbLmJyhATSzy/QIO0EWfjOOTa4QTFKteY8IRw3H6Ee9dQbqxg28gWEKhCMfwaMhH43Di2uyeQDmVVK0GuRrjmJec+JZfegvK7Zk6J7ig/6uAqWyoCCODKECbmIQTZbTzi588WRGCMVyLeXM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674248; 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=nmeGbOHdJRHKrFvc+N52Ii4kxjaKemkxTkxj/MSRw1Y=; b=jrz9GKdwGq5Kka2P1X8F7L4ckWAv3Z9cZDA3jYKHdaRYv1X+lZDp8Zc9LzhjC559UUalm2a5Dx1bwkmPUpbxFUcbyH1ARDXVqk6186D346Rm1Miiz7h2bpmY3y1Z/TRgsRUOZHW6m2Rn7iIlmYtIbZF7t5vv19Hf1BUAuOFxKP4= 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 1588674248100176.32671112530363; Tue, 5 May 2020 03:24:08 -0700 (PDT) Received: from localhost ([::1]:50994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVukA-00046N-SN for importer@patchew.org; Tue, 05 May 2020 06:24:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufV-0003hT-0s for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:40796 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 1jVufU-00081g-5q for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:16 -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-503-7cnbhXB5OTiatjvMDVEW5w-1; Tue, 05 May 2020 06:19:13 -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 02D088014C1 for ; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BDBC19C4F; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id CD32311358BF; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673955; 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=nmeGbOHdJRHKrFvc+N52Ii4kxjaKemkxTkxj/MSRw1Y=; b=e9uDPDU1OVX5RSn59H/99HyFnabRexvFHYSWGpBetjQt9pCs1h17e+J1XcIgv7sso0mHWm pZDGA7ZxoOpT43H/5w6aOiAPQUVWkmBXjlaEUWd9imk4VKEnRak3xH0GkG71j6hbkoD8FK /bvnjHyqJzXuJ/CKqqMif3MdawmwZtY= X-MC-Unique: 7cnbhXB5OTiatjvMDVEW5w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 03/10] s390x/cpumodel: Fix harmless misuse of visit_check_struct() Date: Tue, 5 May 2020 12:19:01 +0200 Message-Id: <20200505101908.6207-4-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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/05 00:37:19 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: 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 --- 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 7c32180269..87a8028ad3 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.1 From nobody Fri Nov 14 12:16:09 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=1588674096; cv=none; d=zohomail.com; s=zohoarc; b=QIkfg7VZBra/dtSQMvTj3XgnGupeCA/eFLnPTJQCKbsaYBaiqaiMVkj04htQ/7JOlo6gH+9dYljT2iMPrx42977b4HN6lZvp88ERNUJ+UfbjMYtYV4b2j8HayF8XmC9cNskU5jENLSt+8xKAFL0uCrgjeELmsfKk2v//3n5SwNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674096; h=Content-Type:Content-Transfer-Encoding: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=Zz6PIHu4D9IJMAUYz5GlS7tUaH56am6CeocpGy7vUGA=; b=frnKDDezp7OWgzMcvMURSzu1GfOHDgxs8iWhwNXGIsMysx2vRkk6VxDIMGySzoK0vGDY80kz8JCNsi/Om6qoVVxhRuIaqQvyHoJUVmepJ45qxf0q7lIoMRR5g4aGtC+OUOhdfnkajOMWJei06OV2izxwVv4kClCs8lmTFraFm3A= 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 1588674096699279.8753274238079; Tue, 5 May 2020 03:21:36 -0700 (PDT) Received: from localhost ([::1]:39020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVuhj-0007Tt-DD for importer@patchew.org; Tue, 05 May 2020 06:21:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufU-0003fE-7D for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43762 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 1jVufS-00081N-O4 for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:15 -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-64-ebb_R8NzPLeRdC7n3d4S_g-1; Tue, 05 May 2020 06:19:11 -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 7DE5153 for ; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 505F16918D for ; Tue, 5 May 2020 10:19:10 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D04C911358C0; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zz6PIHu4D9IJMAUYz5GlS7tUaH56am6CeocpGy7vUGA=; b=g+aZho/2icH1oWYRFOb9a7YnmiXAeb1GfMs3IJWECRipRDIvnyQOacOEPpoGjyDkF+x90c PPAuSl7MFbH1Pez9MWMmxUUX5BjtkBgFqGLdsQ7g2v1WhGd/m83iHTeWiwI2oLVFY2xMt6 uRvPbPof3kxeGoEOXupLEMzHSPIgATQ= X-MC-Unique: ebb_R8NzPLeRdC7n3d4S_g-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 04/10] tests/migration: Tighten error checking Date: Tue, 5 May 2020 12:19:02 +0200 Message-Id: <20200505101908.6207-5-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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=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/05 03:48:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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: , 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" 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 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.1 From nobody Fri Nov 14 12:16:09 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=1588674159; cv=none; d=zohomail.com; s=zohoarc; b=QnOyTQZSlRrUzqW4EDpXr8euKSg9W6H5nIOaMa3siDAcAvEwxJerAY1faer4OCDrfre3OuJu9+yx0XeTh95WN5YfMBkE2fBR1J/6cR93B4u9n/v7WhKbkutxQw5I/gLrojupJtV0TdBqnJ4u0Xg8Hu2p3AHdZarTm3lfD6ujE18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674159; 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=uvu1biCK2na3RfLhukcwuZgCCQadIYpRAx2FfQjZ8w8=; b=niS0dmQ8lixXU+5sDkyp4VrGkfqPNX/Sq61XqoVnv2LhfRad6csKtKHbsxegr44M6QcdM1p7NU/jMhzc5Rt54wqvAwMBVTIW43n0rmEKX2iPAa450OAK6yjg6BAfO29hUahQR/PbFwpU2Y8ww/fOe/eQYDfaC5Fs1sSpHdQ6j2U= 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 15886741595321016.8430694708135; Tue, 5 May 2020 03:22:39 -0700 (PDT) Received: from localhost ([::1]:44070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVuik-000168-71 for importer@patchew.org; Tue, 05 May 2020 06:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufU-0003gm-L8 for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:16 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:34829 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 1jVufT-00081V-JI for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:16 -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-283-DrJCaj7xOfyJvNItCCBF8A-1; Tue, 05 May 2020 06:19:12 -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 119E3462 for ; Tue, 5 May 2020 10:19:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B05516918D; Tue, 5 May 2020 10:19:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D3E2111358C1; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673954; 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=uvu1biCK2na3RfLhukcwuZgCCQadIYpRAx2FfQjZ8w8=; b=eHWNPPJNXse2u4PZifdIUi69o3VCDVD6P9plWQhk1hC5c09gLOWVqZDdbVet54k0V9Wn58 JQuujawOJVvGEgnHI0bU5htM2Qy9FltAuxLw92mQhsqv0HZlp901V8gXRcqeTHQahH1fSu 6DlSjMWcmEzHiXyNM43ow+XNGMXD964= X-MC-Unique: DrJCaj7xOfyJvNItCCBF8A-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 05/10] error: Use error_reportf_err() where appropriate Date: Tue, 5 May 2020 12:19:03 +0200 Message-Id: <20200505101908.6207-6-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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.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/05 00:37:19 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: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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 --- 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 185fe38dda..e5ee685f8c 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 4aa005004e..fe8b0052a2 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 { @@ -979,8 +978,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.1 From nobody Fri Nov 14 12:16:09 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=1588674302; cv=none; d=zohomail.com; s=zohoarc; b=XeSPCB/EXlJiGak3E0Of5Nw5wtTXxv4X0HPhEewpxyPXgiqYJo3kj8o3ezgavYPbpA4MLDq7RNisNluVm1g/fiv9xHk7L3x7BdkUm+JBKEZbIlTVvszT2ow+HqfHHwuQplldMXic/9+8JZILGSHYgnVYoCNfBJISp5a63Tu7Eao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674302; 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=nwTNpVAaHEDQZQFEB6FYVeiqChzthVQsInpfLBJiT48=; b=SBJwIDwsSTrN33E/0ZsEJPGM1p9d4Z8jLKT04giUm8c7c9VIrN8CvScAqd+Hka22R4vdedjX1XJz5/KVE6oUDWOH+5JjJLZ8PkUlE48KvLAdM+JU/li+zjHmqaxVicqDQfW8BDs6EaclT/J1WoNwHw0RiP4WAIARAkkbVu4/usA= 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 1588674302258358.04395001188766; Tue, 5 May 2020 03:25:02 -0700 (PDT) Received: from localhost ([::1]:53120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVul2-0005Em-L5 for importer@patchew.org; Tue, 05 May 2020 06:25:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufW-0003kp-Tv for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54562 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 1jVufV-00082E-UV for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:18 -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-171-bE-wc0ndPXKrrSzLXDxIsA-1; Tue, 05 May 2020 06:19:13 -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 1D2211009441; Tue, 5 May 2020 10:19:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B530E63F95; Tue, 5 May 2020 10:19:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D716511358C2; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673956; 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=nwTNpVAaHEDQZQFEB6FYVeiqChzthVQsInpfLBJiT48=; b=h8LR0IrMp3PMZBDOQExOtYEniNALDsLAtBxs8FALuRl38HcQt+F/r0zrCWFgGTIkhcpbaq rSUuovurOhYD4wbF1N/n7WLmT5GvQ9AuT/GfiNhvZHYpHnHBeHkXmzQMBYcW7U3PzThTmO 3omkC3mbObTgCbBuLUgSbr9/fsUAw8s= X-MC-Unique: bE-wc0ndPXKrrSzLXDxIsA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 06/10] mips/malta: Fix create_cps() error handling Date: Tue, 5 May 2020 12:19:04 +0200 Message-Id: <20200505101908.6207-7-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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 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/05 00:37:38 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, 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) 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 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 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.1 From nobody Fri Nov 14 12:16:09 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=1588674181; cv=none; d=zohomail.com; s=zohoarc; b=AxF89/q+bs1AVLfg5bkJLWl2ZQj3GBIYkEfviDO2RyBoMJ0gxZ7fygaeuteSOWAiVAzk6LGtlkPHe+37qhxMG+rbBrEWG9fQc7bfcUgZpby2hG7Ba7KsD5aikJAhTJbP+Y20C8xQteor1MdHW+4MzoeAERBa7npLVRMDtu2Mg68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674181; 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=ikQSdDOUsESRiUIVbdW54A6+dfH/0XTZY4gzaI0ujN0=; b=n4YGuSbJ9WFT1igDEXXYde/dUoRqfet/ugNpRzt3/lAX027BnUcxoPW9V4E1N3c54h0A3djP+3DRWmxyMpfF2YP/7lYII412PLS5KiHAyW2uU6D4xIBayhxdQi7GFSz44Wdpy9RW3VT6rIRHBUAqSh7Z9Y6YJQBMx6ZV2Ia5df0= 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 1588674181888684.6213410465242; Tue, 5 May 2020 03:23:01 -0700 (PDT) Received: from localhost ([::1]:45724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVuj6-0001lY-GI for importer@patchew.org; Tue, 05 May 2020 06:23:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufX-0003mg-Rb for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:19 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:57806) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jVufX-00082Z-1R for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:19 -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-17-XIUedVTNOtubTFLLJ7fEsA-1; Tue, 05 May 2020 06:19:14 -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 B6A80107ACF2; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B549263F96; Tue, 5 May 2020 10:19:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DA55111358C3; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673958; 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=ikQSdDOUsESRiUIVbdW54A6+dfH/0XTZY4gzaI0ujN0=; b=ibMkHpeq9HyiprDEdJrTw7rlDPYWoh7hx/5Y3TfxkU5fhT5mfBxI4LVkmnAxrSDyD6SOsL nsEBaVaNckAJGBjKtx3JF0QO+xXiEzQGk/AW8WENpULAv21r8IrtTP214YxcxkXs34+u8G rwASwuSy7vlGmzjXtvV5koIRlWw/1FM= X-MC-Unique: XIUedVTNOtubTFLLJ7fEsA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 07/10] mips/boston: Fix boston_mach_init() error handling Date: Tue, 5 May 2020 12:19:05 +0200 Message-Id: <20200505101908.6207-8-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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 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/05 00:37:19 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, 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 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 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.1 From nobody Fri Nov 14 12:16:09 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=1588674043; cv=none; d=zohomail.com; s=zohoarc; b=VNWJRnaTeDwocEwZ0VRf/Rgzo0SWZoVGiEVpPuiud8Lq3hBkm1D+iJkI0DmWpUxTgjNhEwrjPKuMPjIfBxqhhC6UxH29tPaapY0lPyh1EyRsPgfgRQ82XmGJ5LZlOC01isvzwgnMRkHLVcOHJ5PHRHDgVUy4j4LhAyKtceZWh+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674043; 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=hUT/cU4Bd/vQ2eU3ozZI3eDINyvVVCGQcwfYZ9hnxlk=; b=BZgRpA87ooTLXPZpNzntikCnVVKWLh+VjcjfZDRRZbODU2lf9YfgylVyr9Wuxn0/WYFkZxsl+hJ35b6zFbH8hi9n+2be9rgmeJezRsvg5TFRpzk9T+EYd/D1ga9nHAEBzDRVWC7gtVVPU9I5G/2Js7lSru+9AugiSLBdGNP9krY= 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 1588674043474208.22224793917007; Tue, 5 May 2020 03:20:43 -0700 (PDT) Received: from localhost ([::1]:34192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVugr-0005Nm-Vq for importer@patchew.org; Tue, 05 May 2020 06:20:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufV-0003ip-TR for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39756 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 1jVufU-00081k-Cr for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -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-44-ijE1Me-XPgiEV7YcwnoiLQ-1; Tue, 05 May 2020 06:19:14 -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 B333F53; Tue, 5 May 2020 10:19:12 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBF125C1BD; Tue, 5 May 2020 10:19:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DDCE511358C4; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673955; 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=hUT/cU4Bd/vQ2eU3ozZI3eDINyvVVCGQcwfYZ9hnxlk=; b=T9PtQoyA09pjOQqdVl752umMH4fgMER5jANni6nBq5EFp/QNK5L0IPgHiGRFDEoWMcAEvj HtIu2xPwxlwuU/fJCgstXLrfIa0VVlkAeWl9dekeJFGH7AZOkBsRaIOP/JTkgUEltWbs4C 8wZW//K3EJ9PjD4MSksg+dVfmgq/vSc= X-MC-Unique: ijE1Me-XPgiEV7YcwnoiLQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 08/10] mips/boston: Plug memory leak in boston_mach_init() Date: Tue, 5 May 2020 12:19:06 +0200 Message-Id: <20200505101908.6207-9-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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-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/05 03:48:16 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, 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 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 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.1 From nobody Fri Nov 14 12:16:09 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=1588674199; cv=none; d=zohomail.com; s=zohoarc; b=DXDjG3MJeEapAg7suge0D+ehqRGJwSJEdsBZvXVWVJbYTBZiMcRLjM1HxnuaiQLX0n7C9OIW1895uiROjTfBAcI1xQw+5m/vCufbM6AhkucN9KQEGRRTX5BBePdWZsyGwoz9SzAA7RCI+EdGD0dZFiBE6U6Ih1sUG8mpZtUDA6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674199; 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=cuIC9BoatWuQnizIBS6q/YEaV+1wvjtXE0f45fpPM1U=; b=EMdIbQ0ssQx7/l0UUj2gkkY9AHh5TaCGr/9phzK7QxovbR/bibp6kQ7URJaoB6FgJ6PxiDnUVvwa3PMUWvcQhL0UGHhuhPm96cItNtodlZVHD0s62vj/7TIV4YbSgqwFVNoBDTb7w7WbVsZdZslVBkbT13SunCe05YzcIFuPVik= 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 1588674199364920.4749920656067; Tue, 5 May 2020 03:23:19 -0700 (PDT) Received: from localhost ([::1]:47544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVujO-0002go-1n for importer@patchew.org; Tue, 05 May 2020 06:23:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufW-0003jZ-94 for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35187 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 1jVufV-000821-4a for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:17 -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-157-lJGwR1QaNy-IydIhKkWfAg-1; Tue, 05 May 2020 06:19:14 -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 A7FB9835B44; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C0B463F95; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E102911358C5; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673956; 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=cuIC9BoatWuQnizIBS6q/YEaV+1wvjtXE0f45fpPM1U=; b=bjeTHXHSJrI+rkevbW/PxAr2Ks8GqDG+M83vFK6r1aEoPHpfZeAesnWjrF4a/c2gkPX+1Q HST2Cnhh1FMpTPVn014wDK7hteh/XSHocdQ3KocFzuO6+zdfj5Xf5+NMUbhr+LkEUIRMWU x0Yi9lDkn9CLCXNUKR+3X7tNWqAT114= X-MC-Unique: lJGwR1QaNy-IydIhKkWfAg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 09/10] arm/sabrelite: Consistently use &error_fatal in sabrelite_init() Date: Tue, 5 May 2020 12:19:07 +0200 Message-Id: <20200505101908.6207-10-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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 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/05 00:37:38 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, 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) Content-Type: text/plain; charset="utf-8" Cc: Peter Maydell Cc: Jean-Christophe Dubois Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 e31694bb92..04f4b96591 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), &error_fa= tal); - 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.1 From nobody Fri Nov 14 12:16:09 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=1588674149; cv=none; d=zohomail.com; s=zohoarc; b=MlAZOfllTtzZSZFBSaVAuVgaBS98sBe2+sDYDYxcYIT7+I3pg1rwNWUiKPRtSfwut9gLEO5kfJhzHEhCl/gSvb/fWZm2IqJq51wl1De8DVAIC4wbRcDZCeA0b7Sn21e17htIba2Jm2mChZzcJCA/CBt9aFwgdYf/p4BIeaB6CHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588674149; 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=/VuGCwxJ3g4opaKqs7sv6lCxXcUwA/OOYtx/5XTHJeA=; b=Kx29/voy3ig/cjI4YDoeYL0LAmNVnXtEmg3/jpD+vsR6p5bvuTidVfvW4KLKXAPgDhFxlmE3AvBGOr9RoJQeHDx+kVETMz+jdRGCnr66cuppJwADNgBYYzbLg+nhHMERZMoXu09iANGYRVP34TBVxedlfiwKgI7xLF76R5WzZb4= 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 1588674149395536.9051133891674; Tue, 5 May 2020 03:22:29 -0700 (PDT) Received: from localhost ([::1]:43002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVuia-0000eL-1K for importer@patchew.org; Tue, 05 May 2020 06:22:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVufY-0003oR-H5 for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:20 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32517 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 1jVufV-00081w-2D for qemu-devel@nongnu.org; Tue, 05 May 2020 06:19:20 -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-160-VZtceZIwM2ukyuyKV2PsnQ-1; Tue, 05 May 2020 06:19:14 -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 89BED835B40; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-113-6.ams2.redhat.com [10.36.113.6]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E68B63F9B; Tue, 5 May 2020 10:19:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id E43CC11358C6; Tue, 5 May 2020 12:19:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588673956; 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=/VuGCwxJ3g4opaKqs7sv6lCxXcUwA/OOYtx/5XTHJeA=; b=cGSEp5We7WypB0f2ypMCkiiryLmjGt0NkiBQIcFFq7P0oEs8vqQYD0rvPjDDUsKmPnVJjG I9S+l6d5YZmWYJt+wakD13LhDEc0LzjPCjaChYbQ/MDDb7ukhRsIcAEBcIzxnBJl6i38Xa WngMKtJNcZiG0J3QUIOvxx/4WoMWxuM= X-MC-Unique: VZtceZIwM2ukyuyKV2PsnQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 10/10] i386: Fix x86_cpu_load_model() error API violation Date: Tue, 5 May 2020 12:19:08 +0200 Message-Id: <20200505101908.6207-11-armbru@redhat.com> In-Reply-To: <20200505101908.6207-1-armbru@redhat.com> References: <20200505101908.6207-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 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/05 00:37:40 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, 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 --- 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 9c256ab159..16ed95e8da 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); } @@ -6981,7 +6988,7 @@ static void x86_cpu_initfn(Object *obj) object_property_add_alias(obj, "sse4_2", obj, "sse4.2", &error_abort); =20 if (xcc->model) { - x86_cpu_load_model(cpu, xcc->model, &error_abort); + x86_cpu_load_model(cpu, xcc->model); } } =20 --=20 2.21.1