From nobody Mon Feb 9 14:02:49 2026 Delivered-To: importer@patchew.org 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; 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=1576254799; cv=none; d=zohomail.com; s=zohoarc; b=gqOxD7EAO0OWLCdJmgD/tqJrrL0HCuOoWgP3mdK7bBkAocPALgJrkAh68AFtEEx7/djvDb728nriX/C9v6JWzLsnUaVrR+xSOM7JWdsdGl0axEkCbBjP9eASs24apHJHPRRqUjoXq5wCFtxfol4JbGH1K0CFFRTNVnajF8NrS4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576254799; 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=kQR2sdSqZ9cEX9aPchrW/IDdW8VYKLN4r4CJI+RiiHM=; b=Vlthcty4Jfdy+kiuMjcLPPgH4XTiA9vs0pGlYnsJhHaE85ptXhCWM+l79qfi2QgAKQALUBOhfvuLJqXXDHgL4MapgxRmcKiUXpjEvmybJdg8G3621ak/GYrYHqw9vSh69PLA7ptfBqwvPCJkjOQHBQrUYFeJ/bCLCaLWNmdZ6PE= 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 1576254799570284.00039116345863; Fri, 13 Dec 2019 08:33:19 -0800 (PST) Received: from localhost ([::1]:51146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifnsU-0000dm-8w for importer@patchew.org; Fri, 13 Dec 2019 11:33:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40134) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifnfH-0000cO-W0 for qemu-devel@nongnu.org; Fri, 13 Dec 2019 11:19:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifnfG-0001qJ-RK for qemu-devel@nongnu.org; Fri, 13 Dec 2019 11:19:39 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:23366 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifnfG-0001pB-Nl for qemu-devel@nongnu.org; Fri, 13 Dec 2019 11:19:38 -0500 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-69-JCZmTUviOqyEaf0LmEUlqw-1; Fri, 13 Dec 2019 11:19:36 -0500 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 C63918014C1; Fri, 13 Dec 2019 16:19:34 +0000 (UTC) Received: from localhost (ovpn-116-226.ams2.redhat.com [10.36.116.226]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 68315601B6; Fri, 13 Dec 2019 16:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576253978; 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=kQR2sdSqZ9cEX9aPchrW/IDdW8VYKLN4r4CJI+RiiHM=; b=PNLwoK0gdSsUMrEikHz2m+lBW9ZTKo0mK76BCm3X4PXRPgzEGillokRrF00r4u+m4m8Ucc RUki7l4ypncIx0IO1ARSTq9cH6ElzelNo998+/7dRfweFM1zZCuyjpbt26RMA5lLoEkoek 2sA2BjWJyel8CfUVgxz93TCWdjONYvc= From: Cornelia Huck To: Peter Maydell Subject: [PULL 10/16] s390x/event-facility: Fix realize() error API violations Date: Fri, 13 Dec 2019 17:18:45 +0100 Message-Id: <20191213161851.24687-11-cohuck@redhat.com> In-Reply-To: <20191213161851.24687-1-cohuck@redhat.com> References: <20191213161851.24687-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: JCZmTUviOqyEaf0LmEUlqw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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 , qemu-s390x@nongnu.org, David Hildenbrand , qemu-devel@nongnu.org, Markus Armbruster 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" From: Markus Armbruster sclp_events_bus_realize() dereferences @errp when object_property_set_bool() fails. That's wrong; see the big comment in error.h. Introduced in commit f6102c329c "s390/sclp: rework sclp event facility initialization + device realization". No caller actually passes null. Fix anyway: splice in a local Error *err, and error_propagate(). Cc: David Hildenbrand Cc: Cornelia Huck Signed-off-by: Markus Armbruster Reviewed-by: David Hildenbrand Message-Id: <20191204093625.14836-12-armbru@redhat.com> Signed-off-by: Cornelia Huck --- hw/s390x/event-facility.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 66205697ae75..cdcf9154c49e 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -339,14 +339,16 @@ out: =20 static void sclp_events_bus_realize(BusState *bus, Error **errp) { + Error *err =3D NULL; BusChild *kid; =20 /* TODO: recursive realization has to be done in common code */ QTAILQ_FOREACH(kid, &bus->children, sibling) { DeviceState *dev =3D kid->child; =20 - object_property_set_bool(OBJECT(dev), true, "realized", errp); - if (*errp) { + object_property_set_bool(OBJECT(dev), true, "realized", &err); + if (errp) { + error_propagate(errp, err); return; } } --=20 2.21.0