From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530915; cv=none; d=zohomail.com; s=zohoarc; b=e+pq+kiY3Cn3x/0m/fO1SUFkVfvy6xNY6hujic+u8eLhc662CjBpTKbdd6ZChBmvjsAWVRGnec5tmTMXHfctVGRhWigjBI9Z/7I2GW2iJYcZzLH6Is/he44TJuxGeqHkNMwo5/S/qi2du2xU0gmEQjmQtqJGVEuDHNgDif3slmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530915; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5FG86oUoCO09+c0tHPa8E6GjAnI8o3XR83YRJ8fq10A=; b=bmT5hU6E/VfW4/A1g0FQve4KeHo1bQ4lsEE06hNY1ZuF4M79zvbhGeII+gUjHoC8JV46Pn0gCHJekOOnBnGp2Q0BR6+/A0ZBehg2D7iwLL5I0mNQ6jVFUHymONM4MV/IDu1QpWi1lwzvWTDviYFyx3cl1f58GITGwEYmqsBbbtY= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530915196705.2880771804365; Mon, 11 May 2026 13:21:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX86-0001hJ-Nb; Mon, 11 May 2026 16:21:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX82-0001go-MJ for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX81-0001oA-6M for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:26 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-294-fEo93WEFOjG3TgIJV1lAmA-1; Mon, 11 May 2026 16:21:23 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0D0AB18005B3; Mon, 11 May 2026 20:21:22 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A06FE180034E; Mon, 11 May 2026 20:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530884; 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=5FG86oUoCO09+c0tHPa8E6GjAnI8o3XR83YRJ8fq10A=; b=WYQ9lD5EwEnpRDmfY5vy/3aSuidTlGJmSYq8D3993EsMB8Zs+Azk0aAgWIhmmxqn7Sjdgm jjvz6O8RHsWzmay9zABOo1BmyIuX12SLeqV3XjiMGTQ6U6FBK9v/eOyFdCs0LhU50OU5Ck H/a22/pPPr+0RI5/4k/TgZvGgDjDA4Y= X-MC-Unique: fEo93WEFOjG3TgIJV1lAmA-1 X-Mimecast-MFC-AGG-ID: fEo93WEFOjG3TgIJV1lAmA_1778530882 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Elena Ufimtseva , Jagannathan Raman Subject: [PULL 01/24] hw/remote: check visit return in vfu_object_set_socket Date: Tue, 12 May 2026 00:20:47 +0400 Message-ID: <20260511202111.3091440-2-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530917810154100 From: Marc-Andr=C3=A9 Lureau vfu_object_set_socket() dereferences o->socket without checking if visit_type_SocketAddress() succeeded. On failure, o->socket remains NULL, leading to a NULL dereference. Check the return value. Fixes: 8f9a9259d32c ("vfio-user: define vfio-user-server object") Reviewed-by: Jagannathan Raman Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/remote/vfio-user-obj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index 12ecdab6dea..49bf5ecae0c 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -161,7 +161,9 @@ static void vfu_object_set_socket(Object *obj, Visitor = *v, const char *name, =20 o->socket =3D NULL; =20 - visit_type_SocketAddress(v, name, &o->socket, errp); + if (!visit_type_SocketAddress(v, name, &o->socket, errp)) { + return; + } =20 if (o->socket->type !=3D SOCKET_ADDRESS_TYPE_UNIX) { error_setg(errp, "vfu: Unsupported socket type - %s", --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530946; cv=none; d=zohomail.com; s=zohoarc; b=V5uf21Kw+xpS76iRJpSJ5ZsYZleic7jpMICmVKKARybvUTOAuQ/BJrTNKtSDn2iPBSrdPpRnSvLy5r4xQOrQJSp0ybBEAr5FjNPVFsZWm0MzYOHi/GtMvtORF9S6XSMPBmhnhc+Otnl74DCdv+Yj69CVr7tYM0PpIgmlGLvn3u4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530946; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wQqkTlEQmieIt3vcEkIAFkTZ4M54qmPsR29SRzNdARU=; b=k3lbS81zmhzj8e75RvVndMKaMr2b7k9iVC3A9ZxU/PaULw9d6O2Dm0kjRjiHfFvOttOUBk4eAlHnKUpE02GbUhmwTeBS1X1QRx3wskgmqyHjnQ/8BHZcdMKoe4/ZMRrK0bec+690JSH742Q/RsgLZpe+r8xq+QC5fG68p71hpzw= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17785309468511005.7710814512841; Mon, 11 May 2026 13:22:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8D-0001iK-9d; Mon, 11 May 2026 16:21:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX89-0001i6-NH for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX87-0001oi-CT for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:33 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-r6nI_DiCMbiCyiiiFp_F6A-1; Mon, 11 May 2026 16:21:27 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0B98B180034A for ; Mon, 11 May 2026 20:21:27 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 13E8519560A2; Mon, 11 May 2026 20:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530889; 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=wQqkTlEQmieIt3vcEkIAFkTZ4M54qmPsR29SRzNdARU=; b=IjJcj+1u5YO1lInmDrUkV5qGT1AqXgyMX7IP2REyxBodVTb/5aW9f8zqScKzBhp2WIGEnS DctVcJUqjpOgInG21JQK/o85C/38Ho8x3PtQDR95ap5BVsoFNGXGg5ZXwKhxz3sXuP6PWH pzo6UjV5Cb3vgoooP8N/CObBKu/ula0= X-MC-Unique: r6nI_DiCMbiCyiiiFp_F6A-1 X-Mimecast-MFC-AGG-ID: r6nI_DiCMbiCyiiiFp_F6A_1778530887 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 02/24] qom/object: update doc about NULL values in link properties Date: Tue, 12 May 2026 00:20:48 +0400 Message-ID: <20260511202111.3091440-3-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530948237154100 From: Marc-Andr=C3=A9 Lureau Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/qom/object.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index f40d8ccd4a2..2a2829343d0 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1714,10 +1714,10 @@ void object_property_allow_set_link(const Object *o= bj, const char *name, * * Links form the graph in the object model. * - * The @check() callback is invoked when - * object_property_set_link() is called and can raise an error to prevent = the - * link being set. If @check is NULL, the property is read-only - * and cannot be set. + * The @check() callback is invoked when object_property_set_link() is cal= led + * and can raise an error to prevent the link being set. If @check is NULL= , the + * property is read-only and cannot be set. Care must be taken to handle N= ULL + * values for @val. * * Ownership of the pointer that @child points to is transferred to the * link property. The reference count for *@child is --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530930; cv=none; d=zohomail.com; s=zohoarc; b=V4i6F/HtAqjC79ul3BidTgALSiQ0lMtVP+PBZE77AcHZ/WADLpM+rvWjMklg+p6UfSXsGu0q8KCiX6M7+Dux33f0AtQDNpaaZXpouom1A5Ld9C6cGoa2dhtwGdCnUetgb9puOAkN7eScHmjmQnXoV9b62B7AGM9HDMK3hLXGLXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530930; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C4Mb8GE/GJL7hhpoIefqu6tZRIvl1ozEdnQQ06TJf5M=; b=OTfSJl8hnEC9Byxeidh5a+qoEcJa/WRJbKQAU8u+BErgLADQ9l3UhSE6LZRXOBohLZUk4+q8wl13BLz+pf3Y0KFIyDvL34NzM2/tHfUT+JzUwKXl3Bz0qcl3s5YWGz/aJUHi8iMZJ/7Y6vSWLknntcA3Oo7OuYTHW2uBgQqjZGE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530930364743.2018174148608; Mon, 11 May 2026 13:22:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8J-0001mC-FE; Mon, 11 May 2026 16:21:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8H-0001jP-7d for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8F-0001q6-1x for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:40 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-418-mlec2B5qNleERu3swWFmLQ-1; Mon, 11 May 2026 16:21:33 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 79EE319560B2; Mon, 11 May 2026 20:21:32 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D22D18004A3; Mon, 11 May 2026 20:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530898; 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=C4Mb8GE/GJL7hhpoIefqu6tZRIvl1ozEdnQQ06TJf5M=; b=CwT1h3ZyO8tQHaq2GPdUmySr6KQefaAhUM7Edgj/z00Cu0upzo4l9Jj1pAPbgtfxFMCwzg Q+qojqMmHyoDfO1DCuJgPyFr30Eu7NLTv+km7HG1mBMnyq4AsBLA6DF+cY9wbn935H1fmP J8SDn9lIXqibwbLkyHwc6vG1fZGV4io= X-MC-Unique: mlec2B5qNleERu3swWFmLQ-1 X-Mimecast-MFC-AGG-ID: mlec2B5qNleERu3swWFmLQ_1778530892 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , jag.raman@oracle.com, Elena Ufimtseva Subject: [PULL 03/24] hw/remote: guard listener unregister in finalize Date: Tue, 12 May 2026 00:20:49 +0400 Message-ID: <20260511202111.3091440-4-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530932258158500 From: Marc-Andr=C3=A9 Lureau Guard the unregister by checking whether the listener callback was set, which only happens right before registration. Cc: jag.raman@oracle.com Fixes: c7d80c7c1d9 ("multi-process: Associate fd of a PCIDevice with its ob= ject") Reviewed-by: Jagannathan Raman Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/remote/remote-obj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/remote/remote-obj.c b/hw/remote/remote-obj.c index 86192dc8dad..4e74ae76158 100644 --- a/hw/remote/remote-obj.c +++ b/hw/remote/remote-obj.c @@ -154,7 +154,9 @@ static void remote_object_finalize(Object *obj) RemoteObjectClass *k =3D REMOTE_OBJECT_GET_CLASS(obj); RemoteObject *o =3D REMOTE_OBJECT(obj); =20 - device_listener_unregister(&o->listener); + if (o->listener.unrealize) { + device_listener_unregister(&o->listener); + } =20 if (o->ioc) { qio_channel_shutdown(o->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530931; cv=none; d=zohomail.com; s=zohoarc; b=CEC5g/wN4CwiLvOXFSEojR8Jvrniu2KAgc9qK5zqOaIfYd3QGBfAxPInjYY9iDcO82dBxLv7aW+Igw+udoO4wxkJTDixz9lWW+OeUOSvD5U2KzEAhlvH6Hta9dLJNqPTi3rtDPxubY7Sd7SL9ySVh4UqNFIDw62plXKGdC8CM7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530931; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0DVIqgt4ZxibSTGq0lCCHRhM1b3/sOlzkp6SNbD+lxU=; b=kfbGfaG7ZeclrDtzoeYcjhkwQczr/Y607bgURjjqrDPDk74bHtu7u7/MKzLqbBHf+Rw5LO63S5NAjp2bsWIbjkcRXZcR5T3vGWqWDlaPFQTd8CtKN7+gGkGpwaIcBj7awXQhEzEq6HQiORpYS619cyPjKN/cGka3NHXrNjqTr78= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530931756128.2811926803564; Mon, 11 May 2026 13:22:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8K-0001n4-7q; Mon, 11 May 2026 16:21:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8I-0001kX-IQ for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8G-0001qI-UA for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:42 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-252-qZgkE65hM3GRmOhr-ev7Gg-1; Mon, 11 May 2026 16:21:38 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ADD46195609D for ; Mon, 11 May 2026 20:21:37 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 67D3118004A3; Mon, 11 May 2026 20:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530900; 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=0DVIqgt4ZxibSTGq0lCCHRhM1b3/sOlzkp6SNbD+lxU=; b=IS9Bl9hc4s0pZ4ycV17OG4do68uywuCyE7NI/lHO+czsyk7YyrBE9v6Qkibs6/eZ4QRS/y 28WaK/iJ15RIUN+FVnG489ONDP0zwXThQspoEsuXibKZYSnW8mQi4hdQspWRm2kkkI3osH DVGRDDaByrped8CthTqtCqAu5X0ouCQ= X-MC-Unique: qZgkE65hM3GRmOhr-ev7Gg-1 X-Mimecast-MFC-AGG-ID: qZgkE65hM3GRmOhr-ev7Gg_1778530897 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , peterx@redhat.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 04/24] io/net-listener: move mutex init to instance_init Date: Tue, 12 May 2026 00:20:50 +0400 Message-ID: <20260511202111.3091440-5-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530934036158500 From: Marc-Andr=C3=A9 Lureau The QIONetListener mutex is initialized in the convenience constructor qio_net_listener_new() rather than in an instance_init. This means a bare object_new(TYPE_QIO_NET_LISTENER) produces an object with an uninitialized mutex, but instance_finalize unconditionally calls qemu_mutex_destroy() on it, which aborts. Move the mutex initialization to a proper instance_init so that init and finalize are always paired regardless of how the object is created. Fixes: 9d86181874a ("qio: Protect NetListener callback with mutex") Cc: peterx@redhat.com Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Xu Signed-off-by: Marc-Andr=C3=A9 Lureau --- io/net-listener.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/io/net-listener.c b/io/net-listener.c index 9410d72da9c..1fd0f6cb5ab 100644 --- a/io/net-listener.c +++ b/io/net-listener.c @@ -38,7 +38,6 @@ QIONetListener *qio_net_listener_new(void) QIONetListener *listener; =20 listener =3D QIO_NET_LISTENER(object_new(TYPE_QIO_NET_LISTENER)); - qemu_mutex_init(&listener->lock); return listener; } =20 @@ -440,6 +439,13 @@ qio_net_listener_get_local_address(QIONetListener *lis= tener, size_t n, return qio_channel_socket_get_local_address(sioc, errp); } =20 +static void qio_net_listener_instance_init(Object *obj) +{ + QIONetListener *listener =3D QIO_NET_LISTENER(obj); + + qemu_mutex_init(&listener->lock); +} + static void qio_net_listener_finalize(Object *obj) { QIONetListener *listener =3D QIO_NET_LISTENER(obj); @@ -463,6 +469,7 @@ static const TypeInfo qio_net_listener_info =3D { .parent =3D TYPE_OBJECT, .name =3D TYPE_QIO_NET_LISTENER, .instance_size =3D sizeof(QIONetListener), + .instance_init =3D qio_net_listener_instance_init, .instance_finalize =3D qio_net_listener_finalize, }; =20 --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530916; cv=none; d=zohomail.com; s=zohoarc; b=Rbl9YahBmX4/smmThkba5/KhBP3gptCFDTQKVxpjd66OBupm0DFUzMAveQjpY6iA26CgFNrWVwtiQTurnrHAy6gFvwV4DGwy+lH7uRqlpCd0W8HFRauAE35WkbNPL2SlOF8xQWJlZ0J8o1DP5e63/zk5ymu5EdcF/jeylQ1BcHE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530916; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0f2D20iVt6N9YxgaBkpD02MX+ftT9HJHZr6qxmzRDNA=; b=E9g+xMzAO+nxBd97HMKsf4Glwl/RdES6U1bzrC5wWWO/KBBdD7uMLTdZuz7jgzF4YzsLkyZREqNGRx18y6Zj7oVOxKHWiMvPymEipHLATdnXML1S4Q6SYSN4nqAI8/03xF3jzORopn74JOAwqPTd6KCAwev+igu7JsvhEXEIzQ4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530916921150.2847210180429; Mon, 11 May 2026 13:21:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8P-0001pP-Nm; Mon, 11 May 2026 16:21:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8O-0001p0-Kg for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8N-0001so-1f for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:48 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-7s_tsCe0N8--j4spPsIjHw-1; Mon, 11 May 2026 16:21:44 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 04EBE1956094; Mon, 11 May 2026 20:21:43 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D08A218004A3; Mon, 11 May 2026 20:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530906; 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=0f2D20iVt6N9YxgaBkpD02MX+ftT9HJHZr6qxmzRDNA=; b=iCdsqvkR9bLB/ccimb/lY+5N9PM1ORJaKlICdcfjb8DYZPQLw7I5LqUa9Dk/UJ5pevZ+/q UWUVxXUKNzkzm5iKbiAhrSFmCwzAkCoDdU/3qovl8kWtJcewL8I6VULDXngirPDD4ZZnbX c6Sc4QA85z2L6n5vthlOo4JVKVzz2a8= X-MC-Unique: 7s_tsCe0N8--j4spPsIjHw-1 X-Mimecast-MFC-AGG-ID: 7s_tsCe0N8--j4spPsIjHw_1778530903 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , peterx@redhat.com, Zhang Chen , Li Zhijian , Jason Wang Subject: [PULL 05/24] net/colo-compare: guard finalize against uninitialized state Date: Tue, 12 May 2026 00:20:51 +0400 Message-ID: <20260511202111.3091440-6-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530917842154100 From: Marc-Andr=C3=A9 Lureau colo_compare_finalize() assumes the object was fully set up by colo_compare_complete(), but a bare object_new() followed by object_unref() skips the complete callback entirely. This causes two crashes: - qemu_mutex_destroy on the static event_mtx which was never initialized (colo_compare_active is false) - qemu_bh_delete(NULL) and iothread dereference when s->iothread is NULL Guard the event_mtx teardown with colo_compare_active, and the iothread-dependent cleanup with an s->iothread NULL check. Fixes: 45942b79b9f8 ("net/colo-compare.c: Check that colo-compare is active= ") Cc: peterx@redhat.com Acked-by: Peter Xu Signed-off-by: Marc-Andr=C3=A9 Lureau --- net/colo-compare.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index abc1326b704..823b8aa323c 100644 --- a/net/colo-compare.c +++ b/net/colo-compare.c @@ -1416,7 +1416,7 @@ static void colo_compare_finalize(Object *obj) break; } } - if (QTAILQ_EMPTY(&net_compares)) { + if (colo_compare_active && QTAILQ_EMPTY(&net_compares)) { colo_compare_active =3D false; qemu_mutex_destroy(&event_mtx); qemu_cond_destroy(&event_complete_cond); @@ -1431,30 +1431,29 @@ static void colo_compare_finalize(Object *obj) } =20 colo_compare_timer_del(s); + g_clear_pointer(&s->event_bh, qemu_bh_delete); =20 - qemu_bh_delete(s->event_bh); + if (s->iothread) { + AioContext *ctx =3D iothread_get_aio_context(s->iothread); =20 - AioContext *ctx =3D iothread_get_aio_context(s->iothread); - AIO_WAIT_WHILE(ctx, !s->out_sendco.done); - if (s->notify_dev) { - AIO_WAIT_WHILE(ctx, !s->notify_sendco.done); - } + AIO_WAIT_WHILE(ctx, !s->out_sendco.done); + if (s->notify_dev) { + AIO_WAIT_WHILE(ctx, !s->notify_sendco.done); + } + + /* Release all unhandled packets after compare thread exited */ + g_queue_foreach(&s->conn_list, colo_flush_packets, s); + AIO_WAIT_WHILE(NULL, !s->out_sendco.done); =20 - /* Release all unhandled packets after compare thead exited */ - g_queue_foreach(&s->conn_list, colo_flush_packets, s); - AIO_WAIT_WHILE(NULL, !s->out_sendco.done); + object_unref(OBJECT(s->iothread)); + } =20 g_queue_clear(&s->conn_list); g_queue_clear(&s->out_sendco.send_list); if (s->notify_dev) { g_queue_clear(&s->notify_sendco.send_list); } - - if (s->connection_track_table) { - g_hash_table_destroy(s->connection_track_table); - } - - object_unref(OBJECT(s->iothread)); + g_clear_pointer(&s->connection_track_table, g_hash_table_destroy); =20 g_free(s->pri_indev); g_free(s->sec_indev); --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530928; cv=none; d=zohomail.com; s=zohoarc; b=MDcqwIkXqI9DLykKtD003x7Oz7E+VQeS8MyYFNZuuprmgqtwWSoyiz5mQDRDXOH4dyIgn+SVaKt8csZQEp/VKAfzJ3/dUVrjKESOVaecTWVOlHseAk5o8U3RbeZpUddg4LzvdaqUJDSdWXFwD7vU6xv1mmKR6Evc2hfyP46frho= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530928; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YN5TIB8xZhcm71D8v6fTPFcE7OV/kWkJLILB23cEv/c=; b=PNLbBJl1qKfVjXTX6utc65bDbfGAhC0TR7ib2F5gdrB+58Ao25BReGXXnfMw40Rhf14XnA/NvnmjqxE+h6kwPkZ1ZOwO8Z60CwwCdbTWirjgoFyxwQzG14QgC6qtnOwH53VtBB4UUvW1DmdMiowF+mRPQk8lw+H3S9KcNKcy+ZE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530928235458.7258740648725; Mon, 11 May 2026 13:22:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8Z-0002P1-2Z; Mon, 11 May 2026 16:21:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8V-0002Hw-HA for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8T-0001xx-Pk for qemu-devel@nongnu.org; Mon, 11 May 2026 16:21:55 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-516-GCBrX2O-OXy8nl1Nx2kPKw-1; Mon, 11 May 2026 16:21:50 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B2D8E195609D; Mon, 11 May 2026 20:21:48 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1F9C31800465; Mon, 11 May 2026 20:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530913; 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=YN5TIB8xZhcm71D8v6fTPFcE7OV/kWkJLILB23cEv/c=; b=ezlNn9t75o4j0Rs+CA6C6jBYt30d6oyfm2vOZaeIIixtl9K8pwQTLltm7w+ZOkbSvY8SHV yCB60JBboxQo58sKIgPRgur632aoftdbhuHdEy+311cf/YKSC+xq0YGvf8ixngZhi9t+KZ sRAW7hT3GwtLRf/SJdYO7ZqFV5aTVZY= X-MC-Unique: GCBrX2O-OXy8nl1Nx2kPKw-1 X-Mimecast-MFC-AGG-ID: GCBrX2O-OXy8nl1Nx2kPKw_1778530908 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Peter Xu , Mark Cave-Ayland , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 06/24] system/ioport: Fix qom-list-properties crash on portio list obj Date: Tue, 12 May 2026 00:20:52 +0400 Message-ID: <20260511202111.3091440-7-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530929838154100 From: Peter Xu Currently qom-list-properties QMP command will crash when querying the portio list MR object. It's because its finalize() assumes full initialization done in portio_list_add_1(). Provide a simple fix for now to avoid the crash. There is chance for a longer term fix, ideally MR should be initialized in instance_init(). However that'll need more work, and that should also be done with cleaning the hard-coded MR operations in portio_list_add_1(). To be explored. Cc: Mark Cave-Ayland Link: https://lore.kernel.org/r/87a4uvw066.fsf@pond.sub.org Reported-by: Markus Armbruster Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Peter Xu --- system/ioport.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 9209bff2eab..1a0e01fd06b 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -346,8 +346,15 @@ static void memory_region_portio_list_finalize(Object = *obj) { MemoryRegionPortioList *mrpio =3D MEMORY_REGION_PORTIO_LIST(obj); =20 - object_unref(&mrpio->mr); - g_free(mrpio->ports); + /* + * This check makes sure any random object_new() (without doing the + * rest inits in portio_list_add_1()) will not crash when finalizing. + * One example is QMP command qom-list-properties. + */ + if (mrpio->ports) { + object_unref(&mrpio->mr); + g_free(mrpio->ports); + } } =20 static const TypeInfo memory_region_portio_list_info =3D { --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530945; cv=none; d=zohomail.com; s=zohoarc; b=mywtJPUPoDDe11oe5Ow3BBR1KX1nN7krfJPkX13xVOuLd1RpjEqc1hpXJSWN1PAzuAFSnXDHnivCys85St44qQmYR3C6MU2W0jLTO9HgoHmDwmz5TVXZCnn4AN7TKurdFBTQgQEDPRD5g/TwMEo/Roc+RqV+wLlTZx4/epsarUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530945; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IFFJI4aLwWMpSc94KSgiihxeO+B+/H72qXcYnGybsnI=; b=gMQSTG5zzhvaKDTuTLEDybP5QA8CYyqRmXRev/saoUEhaasb73z2xtM4xwS1F0zZFkYVSq0W/2+i6Km9mXfTYgq1qUrodjdM2LbEem3cZYmDvN01VF9/F0PbdQLRyWP/NtGEGbzUiWfb5BqT40Uldv1yOq1D1d5rQ1PNoX811bg= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530945922937.4173571131271; Mon, 11 May 2026 13:22:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8j-0002mn-M2; Mon, 11 May 2026 16:22:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8b-0002bt-KK for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8Z-0001ye-TM for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:01 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-90-WIwhcULVMzidcIc6uq_pHA-1; Mon, 11 May 2026 16:21:54 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 04604180034E for ; Mon, 11 May 2026 20:21:54 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B579330001BE; Mon, 11 May 2026 20:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530919; 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=IFFJI4aLwWMpSc94KSgiihxeO+B+/H72qXcYnGybsnI=; b=SPVRRIe2A6HYTUCFwfsJCpv/AoSgwiFSe2uWWJNouSz1LJgQjt3nv62pMW89nyg+uVV3z9 eZbromI1Bkyowwc+ktD0xDL2AljsSxWc0WrAgnGsuaJLoAGiriwA6BMgEFp+Lp00ToFAfQ XdwW+31OAlxD3KyGLAC94eW4veBSD+I= X-MC-Unique: WIwhcULVMzidcIc6uq_pHA-1 X-Mimecast-MFC-AGG-ID: WIwhcULVMzidcIc6uq_pHA_1778530914 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 07/24] ui/console: remove console from global list on finalization Date: Tue, 12 May 2026 00:20:53 +0400 Message-ID: <20260511202111.3091440-8-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530946135158500 From: Marc-Andr=C3=A9 Lureau This commit removes the QemuConsole from the global "consoles" list when it is finalized, fixing use-after-free on throw-away objects. Reproducer: QMP command qom-list-properties with typename "qemu-text-console", "qemu-fixed-text-console" or "qemu-graphic-console". The assertions added ensure that `dcls`, `gl_block`, and the `dump_queue` are empty before removal, confirming the console is in a clean state. This is left to handle correctly in a future series for hot-unplug case. Reported-by: Markus Armbruster Signed-off-by: Marc-Andr=C3=A9 Lureau --- ui/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/console.c b/ui/console.c index 6f6330d61f1..eaa41086743 100644 --- a/ui/console.c +++ b/ui/console.c @@ -392,10 +392,13 @@ qemu_console_finalize(Object *obj) { QemuConsole *c =3D QEMU_CONSOLE(obj); =20 - /* TODO: check this code path, and unregister from consoles */ + /* TODO: fix hot-unplug support of consoles */ + assert(c->gl_block =3D=3D 0); + assert(qemu_co_queue_empty(&c->dump_queue)); g_clear_pointer(&c->surface, qemu_free_displaysurface); g_clear_pointer(&c->gl_unblock_timer, timer_free); g_clear_pointer(&c->ui_timer, timer_free); + QTAILQ_REMOVE(&consoles, c, next); } =20 static void --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530934; cv=none; d=zohomail.com; s=zohoarc; b=SuAkKXxoHinQbjx2J1GgTkUw8fQfRQg2ymwi2XjF50sn9xFdWRp/adxO1rywPgOonLfatmOQxd9IXFKq/g2k8rqEQ4rxbJ9p/0TAShBx3+IRDjt4YdpzYILUyV7DBuEr2HxnVffwc+pp5E/FiMGBVDUohS1HD0l7JsuWTo83lQs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530934; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=x8Qmpo6a6KqNjqYgOJX9U9yGoThB2VAWHy8SqRE6iCQ=; b=VC4MBwy8XbIe3+jsel/Andtj8mgRxDTmW6bIynFOnTdKDD/s2jB/Xbn/aEgfQWApT/++BdosGU1h6ZsX+CSmmlke2VgB60OB4N4B7Saihl6YiMtXmrS7W2omQhTqWs2jDAygsTSgjyJ8KPNLePYMsOuWf0wR8dCuinIsDDZQ1gg= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530934812172.49862522602098; Mon, 11 May 2026 13:22:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8m-0003Gx-Ub; Mon, 11 May 2026 16:22:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8g-0002jR-VL for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8f-0001zC-9f for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:06 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-6oakSBQ0NguyzgKX2TmwVw-1; Mon, 11 May 2026 16:22:00 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 69FEB180035D; Mon, 11 May 2026 20:21:59 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E5EC230001BE; Mon, 11 May 2026 20:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530923; 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=x8Qmpo6a6KqNjqYgOJX9U9yGoThB2VAWHy8SqRE6iCQ=; b=DTHBtUSJmiLpkNAlFu34hqNCNXrB83tHcA2mRTGvQVZFxOC3KiuMF7xwcH4oVedrLEQ7ts HF3Y7E+oDGftFKskKYwp+9MHii6k1ED+EB+HEzmZY7Z+u6uIAfdkasIYGQk/WNtNIpuQyG zlDRFOqPPIqOEsfVU388hq5687VkZw8= X-MC-Unique: 6oakSBQ0NguyzgKX2TmwVw-1 X-Mimecast-MFC-AGG-ID: 6oakSBQ0NguyzgKX2TmwVw_1778530919 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Richard Henderson , "Michael S. Tsirkin" Subject: [PULL 08/24] hw/i386/x86: free oem_id and oem_table_id on finalization Date: Tue, 12 May 2026 00:20:54 +0400 Message-ID: <20260511202111.3091440-9-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530936179158500 From: Marc-Andr=C3=A9 Lureau x86_machine_initfn allocates oem_id and oem_table_id via g_strndup, but no instance_finalize existed for x86_machine_info, so these strings were never freed when the object was destroyed. Add x86_machine_finalize to release both fields. Fixes: d07b22863b8e ("acpi: Move setters/getters of oem fields to X86Machin= eState") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/i386/x86.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 01872cba073..dc7f0d56b01 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -372,6 +372,14 @@ static void x86_machine_initfn(Object *obj) x86ms->above_4g_mem_start =3D 4 * GiB; } =20 +static void x86_machine_finalize(Object *obj) +{ + X86MachineState *x86ms =3D X86_MACHINE(obj); + + g_free(x86ms->oem_id); + g_free(x86ms->oem_table_id); +} + static void x86_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -445,6 +453,7 @@ static const TypeInfo x86_machine_info =3D { .abstract =3D true, .instance_size =3D sizeof(X86MachineState), .instance_init =3D x86_machine_initfn, + .instance_finalize =3D x86_machine_finalize, .class_size =3D sizeof(X86MachineClass), .class_init =3D x86_machine_class_init, .interfaces =3D (const InterfaceInfo[]) { --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530946; cv=none; d=zohomail.com; s=zohoarc; b=i0byizxToAFbocp4roawc3QTpjVVGF/Tg9hS2Bn64wzCH9+e7Ra9V9mjevCBQELM6/BC/Q2TTjMW/n8GCwEwznBrc9PSyPgpjRUFWZMxTVSx0y9yBQsRSIlSmCR3mNLB5TLSTbxhZsXLfga0aey0ZyC2gKVXVJxtpQ9B41hDGxs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530946; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=roIrWy+rnuMIkfM9Rc1ol9TFLVz+WkLQUPFTE0tFXwQ=; b=fpfBBmKsMoKuPXjaY9zayJgEx4FMo3mMTtJBhi0sty9HhIRzDiiA79ZucpGUnswGfFGYKISNhYao7vqAKQ9sE3ywvyoTkdHs1huN3e8PWV29fqUCJ/xW1KupwvnL+myowwAenqGkIXfMlbYT41vUZ8qNejs0eiCSkbUbNAYG6M4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530946691467.2479783504699; Mon, 11 May 2026 13:22:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8n-0003Hf-26; Mon, 11 May 2026 16:22:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8l-00035Z-Aj for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8j-000204-GH for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:11 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-573-dEDiCke8M7Wfh1rwTynatg-1; Mon, 11 May 2026 16:22:04 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 22F041800283; Mon, 11 May 2026 20:22:04 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2BAE330001BE; Mon, 11 May 2026 20:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530928; 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=roIrWy+rnuMIkfM9Rc1ol9TFLVz+WkLQUPFTE0tFXwQ=; b=NHUD//dnqBfYoxtnlXE7RNh1drjWHPqIUVC2gISrB/iZyEBTTpiA/xlMfqktuQMotcZjo7 4dZDBMtqBw6zq+sdTNZLIMxXVrS0gMT7IUeogYJqu5Bh+l3JCS7n4rZdEg2smYGiCY7Y+k vjpKUjaIAXeo4/oFO4FXxmOh0O7CGIw= X-MC-Unique: dEDiCke8M7Wfh1rwTynatg-1 X-Mimecast-MFC-AGG-ID: dEDiCke8M7Wfh1rwTynatg_1778530924 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell Subject: [PULL 09/24] hw/core/resetcontainer: free children array on finalization Date: Tue, 12 May 2026 00:20:55 +0400 Message-ID: <20260511202111.3091440-10-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530948137158500 From: Marc-Andr=C3=A9 Lureau resettable_container_init allocates a GPtrArray for children, but resettable_container_finalize was empty and never freed it. Fixes: 4c046ce37af0 ("hw/core: Add ResetContainer which holds objects imple= menting Resettable") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/core/resetcontainer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/core/resetcontainer.c b/hw/core/resetcontainer.c index ef84aa2374a..a4a6476a036 100644 --- a/hw/core/resetcontainer.c +++ b/hw/core/resetcontainer.c @@ -66,6 +66,9 @@ static void resettable_container_init(Object *obj) =20 static void resettable_container_finalize(Object *obj) { + ResettableContainer *rc =3D RESETTABLE_CONTAINER(obj); + + g_ptr_array_unref(rc->children); } =20 static void resettable_container_class_init(ObjectClass *klass, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530940; cv=none; d=zohomail.com; s=zohoarc; b=fYIeLWqI95yyB1mCOX+Aw/EJGhrYYDgVt60nWmL/F2Vh5fkrEV5/A8RxASD8IUGJiWkTeumOZvhxMBCPNRC2t4KeX/5nAqBNJY469ZjUwbr1wJF95m1bGRQ2q2T7xByckcx2jkcNKdnowOGOqSO615/2mOtJDZbHzjC+uMhA1XA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530940; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ck9oxXsPwba+56Bsnnc0jVTBh7LdjgqMRrXXUMKXUi4=; b=emzoANrdCYAsEm51hdfTiURTXPW2rOSbo21s0VWDlRaRVVFyJHdw9OFei5MuvnsP8Yp6bmiX1GfpWB1MVnzJQ3bMr+3Tbyu8FdhawFBKzeuFqT5yfTcXAFgWqA9MY98UzNBIsmgpQltfhddjE7yK09NEN6Oc+3j9LnFleX0L35U= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530940676867.467666439158; Mon, 11 May 2026 13:22:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8q-0003eU-Pm; Mon, 11 May 2026 16:22:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8p-0003aV-Vq for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8o-00021Q-ED for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:15 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-328-UwxJ-exRNgq0wMN5VK5i0Q-1; Mon, 11 May 2026 16:22:11 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4F68F1956066; Mon, 11 May 2026 20:22:10 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6291F1955D84; Mon, 11 May 2026 20:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530933; 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=Ck9oxXsPwba+56Bsnnc0jVTBh7LdjgqMRrXXUMKXUi4=; b=C26PDXvCYR1jENLIWrdaEn+ROqCoHDXDh5WVQIhYFnb0WLu8djL6pcZVYlcAIvSGU8zoVv T7aDSDVzGqZ6J1BdVzKT/iTCbI3jG9uXYP5OXCUHKzpYVLOIyCgqSWuZ17xrG0ujA6rHKD XWjvnst3TvesTK+9KihOpk8C91UwJwo= X-MC-Unique: UwxJ-exRNgq0wMN5VK5i0Q-1 X-Mimecast-MFC-AGG-ID: UwxJ-exRNgq0wMN5VK5i0Q_1778530930 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Pavel Pisa , Francisco Iglesias , Vikram Garhwal , Jason Wang Subject: [PULL 10/24] net/can: free ifname on socketcan finalization Date: Tue, 12 May 2026 00:20:56 +0400 Message-ID: <20260511202111.3091440-11-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530942437158500 From: Marc-Andr=C3=A9 Lureau can_host_socketcan_set_if allocates ifname via g_strdup, but no instance_finalize existed to free it. Fixes: ea15ea8a7c67 ("net/can: support for connecting to Linux host SocketC= AN interface.") Acked-by: Pavel Pisa Signed-off-by: Marc-Andr=C3=A9 Lureau --- net/can/can_socketcan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/can/can_socketcan.c b/net/can/can_socketcan.c index 8a57ae07178..be67ed7f5a9 100644 --- a/net/can/can_socketcan.c +++ b/net/can/can_socketcan.c @@ -319,11 +319,19 @@ static void can_host_socketcan_class_init(ObjectClass= *klass, chc->disconnect =3D can_host_socketcan_disconnect; } =20 +static void can_host_socketcan_finalize(Object *obj) +{ + CanHostSocketCAN *c =3D CAN_HOST_SOCKETCAN(obj); + + g_free(c->ifname); +} + static const TypeInfo can_host_socketcan_info =3D { .parent =3D TYPE_CAN_HOST, .name =3D TYPE_CAN_HOST_SOCKETCAN, .instance_size =3D sizeof(CanHostSocketCAN), .instance_init =3D can_host_socketcan_instance_init, + .instance_finalize =3D can_host_socketcan_finalize, .class_init =3D can_host_socketcan_class_init, }; =20 --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530966; cv=none; d=zohomail.com; s=zohoarc; b=ZDOwnV7hQuViVAtd6gk7v4o5l+FcLlfusKVq1mQ/j7KtRrTAEeJkSI2gA5WNHsUQ0xoF9H7q40Mu2xrgfQiLZkd9FriGpl7WGV+lHfDMUmmI7ihpErdsRtqN22sMbt33dwS1sHljdkvXg4GN0hOYwkNkIkKO3QwnPI6klmCgSS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530966; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EEip8eP/B5FO65d2IFv0VJc8NU9987pdSHR+yjUVtnM=; b=BtVH/WEAVRk9TaTmbGVmQVd9cvz7F9mH+CpiRaI6u4K6wJ8s89ExBtQRix0QsG4VCHCGUZsyt6LJJs5aSMde6L9mpk+H4ZvTVzaVSB7I7yYA0IE2BJ/9E791hsyw5dbKgmffc2SLmgnaJesDMHOkWYDz/SlpdniceTfy/vtvPCM= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530966744762.7868850086268; Mon, 11 May 2026 13:22:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX8y-0004EU-Kr; Mon, 11 May 2026 16:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8v-00043j-SL for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:22 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8u-00027X-5E for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:21 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-44-Ke-j2s7hN72dUbOfzjR1Gg-1; Mon, 11 May 2026 16:22:16 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F0F9E18002E4 for ; Mon, 11 May 2026 20:22:15 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5142C3002D31; Mon, 11 May 2026 20:22:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530939; 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=EEip8eP/B5FO65d2IFv0VJc8NU9987pdSHR+yjUVtnM=; b=Z+lnB9n7hLU0RS8Ofvfunq211yl0DQH+TqqP2YpakT7O6wPxjHPBtxw61SaJOF0j5LJ8TW wRkCpXZ7zSq5EvFYc2gvx4DC3APmQUTyUSPr8ud3FaVYmtnvvwIASLMVHga7J2QYy1mTIM vAA97dFhH2UJVWeHdJu1XaahnMf/P/o= X-MC-Unique: Ke-j2s7hN72dUbOfzjR1Gg-1 X-Mimecast-MFC-AGG-ID: Ke-j2s7hN72dUbOfzjR1Gg_1778530936 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , Stefano Garzarella , Ani Sinha Subject: [PULL 11/24] backends/igvm-cfg: free filename on finalization Date: Tue, 12 May 2026 00:20:57 +0400 Message-ID: <20260511202111.3091440-12-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530968243158500 From: Marc-Andr=C3=A9 Lureau set_igvm allocates filename via g_strdup, but igvm_cfg_finalize did not free it. Fixes: c1d466d267cf ("backends/igvm: Add IGVM loader and configuration") Reviewed-by: Gerd Hoffmann Signed-off-by: Marc-Andr=C3=A9 Lureau --- backends/igvm-cfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backends/igvm-cfg.c b/backends/igvm-cfg.c index 64589ca34f2..e1f09855f66 100644 --- a/backends/igvm-cfg.c +++ b/backends/igvm-cfg.c @@ -108,4 +108,5 @@ static void igvm_cfg_finalize(Object *obj) if (igvm->file >=3D 0) { igvm_free(igvm->file); } + g_free(igvm->filename); } --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530965; cv=none; d=zohomail.com; s=zohoarc; b=b5tiwftNULgLcMOeKwUu1cUFcjxHDDyEf/DxGKXVk0i75l1QNRrQII+TWjC2wacWi4ZcIJyHvaceTIy4xQ/DYmBORTQdcPj3vtZyahlGRquJyHalocZmlWmByepqFHzmBWXZeP8E1Lw64CjlQtzXXzXxqdJmnUzstYRt2qkPjfU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530965; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bm28jziSjOXa5vZgSqyUu0062h7zFWqzxLiwmvEvuTc=; b=ELq2u27+5kNaO06e3sQq+fXZS3oDXIJDAQVT1yy8tw/uXMHKtBm6sq6wbyzsIH4i7PNZJ32bwD09qtIQECygc1Btw01cg4d0JdKZZKqzYk3d7XaRITNv+R5X01NjBFcORtsAoXue7jfHm9gD3x7ixQAakP/YZi6mwsbpAp/smJM= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530965404954.4588286272303; Mon, 11 May 2026 13:22:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9G-0004cM-MM; Mon, 11 May 2026 16:22:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX93-0004TM-6T for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX8z-00027n-47 for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:26 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-yPedE7O_NUy2GhpxJFHNKg-1; Mon, 11 May 2026 16:22:22 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5C28C1956066; Mon, 11 May 2026 20:22:21 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id EDBD219560AB; Mon, 11 May 2026 20:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530944; 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=bm28jziSjOXa5vZgSqyUu0062h7zFWqzxLiwmvEvuTc=; b=YjaVdYs9QaOgnoqv7WJfPDUPz4kgEIhGTwQrVIH/Wo/eeU2teiROon9dqYp8O+r3OUqfyp /Q5eLEuoksith+n8/MCwKmmwGASr4pPYzP41o32ozmMty8O4ES/v8Tp36rihH4T7a0Zg3R PBPYAAcVy0xhz/S6Ri/PNfNxxnMe/TQ= X-MC-Unique: yPedE7O_NUy2GhpxJFHNKg-1 X-Mimecast-MFC-AGG-ID: yPedE7O_NUy2GhpxJFHNKg_1778530941 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Fam Zheng , qemu-block@nongnu.org (open list:Block SCSI subsystem) Subject: [PULL 12/24] scsi/pr-manager-helper: free path on finalization Date: Tue, 12 May 2026 00:20:58 +0400 Message-ID: <20260511202111.3091440-13-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530966369158500 From: Marc-Andr=C3=A9 Lureau set_path allocates path via g_strdup, but pr_manager_helper_instance_finalize did not free it. Fixes: 9bad2a6b9d0a ("scsi: add persistent reservation manager using qemu-p= r-helper") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- scsi/pr-manager-helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scsi/pr-manager-helper.c b/scsi/pr-manager-helper.c index f6454cd80de..53432e6d606 100644 --- a/scsi/pr-manager-helper.c +++ b/scsi/pr-manager-helper.c @@ -284,6 +284,7 @@ static void pr_manager_helper_instance_finalize(Object = *obj) { PRManagerHelper *pr_mgr =3D PR_MANAGER_HELPER(obj); =20 + g_free(pr_mgr->path); object_unref(OBJECT(pr_mgr->ioc)); qemu_mutex_destroy(&pr_mgr->lock); } --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530989; cv=none; d=zohomail.com; s=zohoarc; b=FJwPyzR0UlM0j0T6DjjAGq7EJsh1dsXX3qrF48iRbOivMK9D3uxHG7pM0HTEE9KrP7X5emLXPtkR7df8Z4/ec8+NyO7WGDz2AvQL+6PGRol2Jznp3MflqlL2xkmgP0YlCcmBYGHAd5sW/auw83hJfEo9JOclonmgczbN1P9D8e0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530989; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4gK+1NyCwHvVEv8FjA+IkYWzzVz8wUm5geGfRaiWoRM=; b=WBzzWT4yMj7FgcltXgJt4OChnCMr4s3TPOq4OQ7XhOJV+liC9vqMBIssStOeJ3g8a5200q3hT4B+ZZrh23PVtBdLbUdVn5NAnf5VvwkfNso9j7kcICONskkoBiP7FngYrXrP1IxkwVDOkTa7OaIDBknk7bMmTRreKGoy2CL5CPY= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530989229555.0541718450755; Mon, 11 May 2026 13:23:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9J-0004s3-5O; Mon, 11 May 2026 16:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX98-0004UK-EJ for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX96-00028b-N8 for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:33 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-C4SjNV-1OoCmDfLQDysNlA-1; Mon, 11 May 2026 16:22:27 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9E48A19560AE; Mon, 11 May 2026 20:22:26 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5C1B218004A3; Mon, 11 May 2026 20:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530951; 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=4gK+1NyCwHvVEv8FjA+IkYWzzVz8wUm5geGfRaiWoRM=; b=cue2HAYu6zTtJdzDBg/ioh8YC93hehzkpuMvuoJjPC/5rYaenB/OMgg/di07TftsddEMEn L2SwTPmRveOdkgaoA+RARKLoeXw22kxcvPY8gCeVgkmFvMp8gqIRwmyKcNiktgrqm7ND2s 0FIaeY48pQrKw2G4a6we6/zh3pzooYw= X-MC-Unique: C4SjNV-1OoCmDfLQDysNlA-1 X-Mimecast-MFC-AGG-ID: C4SjNV-1OoCmDfLQDysNlA_1778530946 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , kvm@vger.kernel.org (open list:Overall KVM CPUs) Subject: [PULL 13/24] accel/kvm: free device path on finalization Date: Tue, 12 May 2026 00:20:59 +0400 Message-ID: <20260511202111.3091440-14-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530991004154100 From: Marc-Andr=C3=A9 Lureau kvm_set_device allocates device via g_strdup, but no instance_finalize existed for the KVM accelerator type. Fixes: aef158b093b9 ("Add class property to configure KVM device node to us= e") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- accel/kvm/kvm-all.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 92af42503b1..96f90ebb240 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -4342,10 +4342,18 @@ static void kvm_accel_class_init(ObjectClass *oc, c= onst void *data) kvm_arch_accel_class_init(oc); } =20 +static void kvm_accel_finalize(Object *obj) +{ + KVMState *s =3D KVM_STATE(obj); + + g_free(s->device); +} + static const TypeInfo kvm_accel_type =3D { .name =3D TYPE_KVM_ACCEL, .parent =3D TYPE_ACCEL, .instance_init =3D kvm_accel_instance_init, + .instance_finalize =3D kvm_accel_finalize, .class_init =3D kvm_accel_class_init, .instance_size =3D sizeof(KVMState), }; --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530984; cv=none; d=zohomail.com; s=zohoarc; b=P+CQu08l9dp/pSJ4a+PJ2H6oMBlHtL98PdusNSbOzCkpah6UWH7Mljnj/SI9Fe6/GSifrJDUXNjxf9+yhj2vQNg1+x8Z00xhQarXhTE2W69hJln0d5HZUsrU96flbgSGFeW5L0mF3jNDPYnhajys6fI9ngw5ubzr3/eHbsobWxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530984; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zaFmpzO9wm5ZBT47gYTD3GZuFhtThIZcvMGQksKD/Co=; b=S0nMGEYNUIP5dSqeJCWZjtSo6QppinCwgFOe9q1DU5NVoxTbw4UIPrPd7ftGNO2C6OAPE24XnnDBtQYu+uWOw9b3vGooO4NKaEUvYSJa9AQoV/n+m2E4loYtI53TSmfnKQlkPZz6Jk+FBDcaFJnL3WwZYcCbCsxfxu985o5mhDw= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530984641426.57319143619486; Mon, 11 May 2026 13:23:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9J-0004qq-1u; Mon, 11 May 2026 16:22:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9F-0004bg-4M for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9C-000295-B0 for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:40 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-mw7HuTHwOPWd0h16rRB-ew-1; Mon, 11 May 2026 16:22:33 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 62AF618002C8; Mon, 11 May 2026 20:22:32 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D16C91955D84; Mon, 11 May 2026 20:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530956; 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=zaFmpzO9wm5ZBT47gYTD3GZuFhtThIZcvMGQksKD/Co=; b=abRL2uknNkdw8k7huIRi1B4vaHWIPmVoNoiC/rmHxrELPBZ8q2R886FAY8NJSkJwPV+rD1 T4ANx+M/Q/YmhqUP2Fx6NjL1BNubKtAwFt7RoWEMI612Iy6YPBXHYgnPwaRssyi2dP9WoC tBXkminkR8ogOZMFPp2nko9HIy0UtgY= X-MC-Unique: mw7HuTHwOPWd0h16rRB-ew-1 X-Mimecast-MFC-AGG-ID: mw7HuTHwOPWd0h16rRB-ew_1778530952 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Fabiano Rosas , Laurent Vivier , Paolo Bonzini Subject: [PULL 14/24] system/qtest: add missing qtest_finalize() Date: Tue, 12 May 2026 00:21:00 +0400 Message-ID: <20260511202111.3091440-15-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530986945154100 From: Marc-Andr=C3=A9 Lureau Free owned resources on object finalization. Fixes: 6ba7ada3559e ("qtest: add a QOM object for qtest") Reviewed-by: Peter Maydell Signed-off-by: Marc-Andr=C3=A9 Lureau --- system/qtest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/qtest.c b/system/qtest.c index cf90cd53adb..a79d10d1361 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -1020,10 +1020,20 @@ static void qtest_class_init(ObjectClass *oc, const= void *data) qtest_get_log, qtest_set_log); } =20 +static void qtest_finalize(Object *obj) +{ + QTest *q =3D QTEST(obj); + + g_free(q->chr_name); + g_free(q->log); + object_unref(q->chr); +} + static const TypeInfo qtest_info =3D { .name =3D TYPE_QTEST, .parent =3D TYPE_OBJECT, .class_init =3D qtest_class_init, + .instance_finalize =3D qtest_finalize, .instance_size =3D sizeof(QTest), .interfaces =3D (const InterfaceInfo[]) { { TYPE_USER_CREATABLE }, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778530982; cv=none; d=zohomail.com; s=zohoarc; b=IU6OZHcqmBE+onPXUkcv22Ocjx1PKDtZvWng7gBqFLWNh2FiWlJTUE16Kg80AGDpxneTrflhLL9fiY70LvXYviRtHvTo6Vd3xFqzRw6kKaLqVs+pHhOuORD8nq07dx3mg6QaacuEmiygVooVjFxrB0mp7ST61KHK7NgcsB1kRys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778530982; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V4iSM+T4OP0fJeJqglC+eTicdbxJnPoKhqUi6eEqqtI=; b=gSrm9UwmYSnGnhPyFYKXVWFf+0Vs/cpgDRS838lowPHO7clgT4S1Bwk2aVDVWr7OcpB52vFSU0pPEio9BFX9bb0vDgjzRViGGxD2IR+5fCipsdCG1rwdrvYaAvTTL/g2dnwi0UD9+kGm9iMbBJaXeT+g8nUXCGxhDohIAxI7u1k= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778530982010343.609340919135; Mon, 11 May 2026 13:23:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9P-0005XU-9U; Mon, 11 May 2026 16:22:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9N-0005Kn-6I for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9L-0002FQ-KO for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:48 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-134-lKpJnAvtO2GtdZiEqWgh4Q-1; Mon, 11 May 2026 16:22:41 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BAF491800372; Mon, 11 May 2026 20:22:38 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 667EE1800465; Mon, 11 May 2026 20:22:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530967; 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=V4iSM+T4OP0fJeJqglC+eTicdbxJnPoKhqUi6eEqqtI=; b=G3kRuieJOhR2IilFcHRdAYGojRZN+LrjGWsdK73SLM1WN77kV7oicEZdnUQEk4+NtskXBM 1VSk62/Q41AA26Ju1GgJTTg+WVxeONYUeCQ8+TukI1oqSa8kYr0lG+uVJfOD+lCIijNLCN hvHtEXCQXWkPRt2I3Td+skYjEWYravY= X-MC-Unique: lKpJnAvtO2GtdZiEqWgh4Q-1 X-Mimecast-MFC-AGG-ID: lKpJnAvtO2GtdZiEqWgh4Q_1778530959 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , Ninad Palsule , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 15/24] hw/fsi: move OPBus address space init to realize Date: Tue, 12 May 2026 00:21:01 +0400 Message-ID: <20260511202111.3091440-16-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778530985214154100 From: Marc-Andr=C3=A9 Lureau The OPBus instance_init initializes an AddressSpace, registering it in the global address_spaces list. When a bare OPBus object is created and destroyed (e.g. by qom-tests), there is no finalize to remove the stale entry, leading to a heap-use-after-free when a subsequent flatviews_reset iterates the list. Move address_space_init to the bus realize callback and add the corresponding address_space_destroy in unrealize, following the NubusBus pattern. Also fix the memory_region_init owner from NULL to the OPBus object, so the MR is properly parented instead of dangling under the "unattached" container. Fixes: eb04c35da2c0 ("hw/fsi: Aspeed APB2OPB & On-chip peripheral bus") Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/fsi/aspeed_apb2opb.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/hw/fsi/aspeed_apb2opb.c b/hw/fsi/aspeed_apb2opb.c index b9d72f3ecf6..36092468391 100644 --- a/hw/fsi/aspeed_apb2opb.c +++ b/hw/fsi/aspeed_apb2opb.c @@ -348,15 +348,37 @@ static void fsi_opb_init(Object *o) { OPBus *opb =3D OP_BUS(o); =20 - memory_region_init(&opb->mr, 0, TYPE_FSI_OPB, UINT32_MAX); + memory_region_init(&opb->mr, o, TYPE_FSI_OPB, UINT32_MAX); +} + +static void fsi_opb_realize(BusState *bus, Error **errp) +{ + OPBus *opb =3D OP_BUS(bus); + address_space_init(&opb->as, &opb->mr, TYPE_FSI_OPB); } =20 +static void fsi_opb_unrealize(BusState *bus) +{ + OPBus *opb =3D OP_BUS(bus); + + address_space_destroy(&opb->as); +} + +static void fsi_opb_class_init(ObjectClass *klass, const void *data) +{ + BusClass *bc =3D BUS_CLASS(klass); + + bc->realize =3D fsi_opb_realize; + bc->unrealize =3D fsi_opb_unrealize; +} + static const TypeInfo opb_info =3D { .name =3D TYPE_OP_BUS, .parent =3D TYPE_BUS, .instance_init =3D fsi_opb_init, .instance_size =3D sizeof(OPBus), + .class_init =3D fsi_opb_class_init, }; =20 static void fsi_opb_register_types(void) --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531062; cv=none; d=zohomail.com; s=zohoarc; b=YZwzPdVVfpfVQKUfOL6gmMgFYJClcZ1D8lUmIXTDB3wOCu/SPl8H8qjxSyo9OuEkssrOpRtEfLFMBOARdktHiP2W9xx/RD0V4LGgqOuuJ+NEZm63xk7ta4eZ6WAVpS01UsqRLNO5Pku8xzGsLiWXtEfAzgkDB207EZv9aNjcr4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531062; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2C0RocEaioxRTatUpe6UZmuTE1Y097AlBK4Uk3G/4Yk=; b=LfgiYyfxSUkZLC6LuwZqsFohbrdcrXm8qX1XM7H1caOzID+p4NKqVPOlAqQWZEdy6Q/rCiSskxKqxERtncoDt1h6Br/olugp16sYkJo6Z+7RDay42nNTE2TslreHTKfpxdMoL+eTj+kRPd1Xeh9RJ1XvrhVi/eawAisYDLTi2gQ= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531062444852.0256544529091; Mon, 11 May 2026 13:24:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9T-0005u1-R7; Mon, 11 May 2026 16:22:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9R-0005cF-OR for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9Q-0002IG-Bv for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:53 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-391-Y7VxbRrTNp6pNM2TO3WMIw-1; Mon, 11 May 2026 16:22:46 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0F8118002CB; Mon, 11 May 2026 20:22:44 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BC2481955D84; Mon, 11 May 2026 20:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530971; 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=2C0RocEaioxRTatUpe6UZmuTE1Y097AlBK4Uk3G/4Yk=; b=czhb2Va6RoFxrA5rFN88A3uu475wIy/AkdzsOrBrrBmXRi7OHen3B5eL9k359dYt0DnTKy BB6KYaqV4KytT8Ljs9VGPdYpgAVC/o+cjlGjWxC7zsWh1qbqhRx6/QkqSQ0Gf++aTfDcaQ n6ufx1TlVhWkRUBrxB28d84lcGGhIYE= X-MC-Unique: Y7VxbRrTNp6pNM2TO3WMIw-1 X-Mimecast-MFC-AGG-ID: Y7VxbRrTNp6pNM2TO3WMIw_1778530964 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , Ninad Palsule , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 16/24] hw/fsi: move OPBus qbus_init() to instance_init Date: Tue, 12 May 2026 00:21:02 +0400 Message-ID: <20260511202111.3091440-17-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531064546154100 From: Marc-Andr=C3=A9 Lureau Remove the TODO comment that documented the workaround, as it is no longer needed. Suggested-by: C=C3=A9dric Le Goater Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/fsi/aspeed_apb2opb.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/hw/fsi/aspeed_apb2opb.c b/hw/fsi/aspeed_apb2opb.c index 36092468391..058abc86452 100644 --- a/hw/fsi/aspeed_apb2opb.c +++ b/hw/fsi/aspeed_apb2opb.c @@ -273,6 +273,7 @@ static void fsi_aspeed_apb2opb_init(Object *o) for (i =3D 0; i < ASPEED_FSI_NUM; i++) { object_initialize_child(o, "fsi-master[*]", &s->fsi[i], TYPE_FSI_MASTER); + qbus_init(&s->opb[i], sizeof(s->opb[i]), TYPE_OP_BUS, DEVICE(s), N= ULL); } } =20 @@ -282,18 +283,6 @@ static void fsi_aspeed_apb2opb_realize(DeviceState *de= v, Error **errp) AspeedAPB2OPBState *s =3D ASPEED_APB2OPB(dev); int i; =20 - /* - * TODO: The OPBus model initializes the OPB address space in - * the .instance_init handler and this is problematic for test - * device-introspect-test. To avoid a memory corruption and a QEMU - * crash, qbus_init() should be called from realize(). Something to - * improve. Possibly, OPBus could also be removed. - */ - for (i =3D 0; i < ASPEED_FSI_NUM; i++) { - qbus_init(&s->opb[i], sizeof(s->opb[i]), TYPE_OP_BUS, DEVICE(s), - NULL); - } - sysbus_init_irq(sbd, &s->irq); =20 memory_region_init_io(&s->iomem, OBJECT(s), &aspeed_apb2opb_ops, s, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531046; cv=none; d=zohomail.com; s=zohoarc; b=T5XI9NS0boVg7Dgt+pNMX+9xPUeUjRC7BeeeLjnTmINCXjeKhcU4Z2LN+jxc8t16JcYQMkw0Zj6LNgROEzfaIqyiWctof2IPrJ3DlhLJggjVeGYgQ7GNNy4GbsbqPv6xCNwcTIcLzlo7Gn3YxGAAoQTn77x0utwC8cHGN26pGok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531046; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZgRr3BB07aQYVQGC7Oar0fp/I3aHyKM846fAkj8iX1k=; b=O+JKGD1qHn02tX6BHXU8SItK6dlxl4UZ9fem11bvkBEg7YSWWvVArL6JM1jze1OUyHP/4Lol3vubx+cJeX5By+PRsOmQOYgdBnT8LDeri+hwpEeWZOK2QV4bRWS3/PjDws1CSKUUsJK/gs9kQnFdDbl2EqLiZam6pkr/PhKbqnQ= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531046053393.8146923592477; Mon, 11 May 2026 13:24:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9W-0006GP-SM; Mon, 11 May 2026 16:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9V-00064Y-8f for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9T-0002JR-Ox for qemu-devel@nongnu.org; Mon, 11 May 2026 16:22:56 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-qYJslyQqMu2vLZW5wkzumA-1; Mon, 11 May 2026 16:22:51 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F2D2219560AB; Mon, 11 May 2026 20:22:49 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A1D101955D84; Mon, 11 May 2026 20:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530975; 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=ZgRr3BB07aQYVQGC7Oar0fp/I3aHyKM846fAkj8iX1k=; b=dyWgl1D2SeAks04JJ6OpOFJ8vFCr9OF+KmBVnRrKurkgAcUvT4nBaFX/vcUdmKyDqHZNcy vpM556I4F9E2ihWHG2CBGvl3N6fdJghzhJvqCZ8bByPAgzW1dMHCRPz78ktwyIUEuWjc37 k/o9Fqpingw40SJPu1jc/8P4equyasU= X-MC-Unique: qYJslyQqMu2vLZW5wkzumA-1 X-Mimecast-MFC-AGG-ID: qYJslyQqMu2vLZW5wkzumA_1778530970 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Glenn Miles , qemu-ppc@nongnu.org (open list:pca955x), qemu-arm@nongnu.org (open list:pca955x) Subject: [PULL 17/24] hw/gpio/pca9552: fix state_str leak in pca955x_set_led Date: Tue, 12 May 2026 00:21:03 +0400 Message-ID: <20260511202111.3091440-18-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531047304158500 From: Marc-Andr=C3=A9 Lureau visit_type_str() allocates state_str, but the function never frees it on any code path. Use g_autofree to ensure it is freed on return. Fixes: a90d8f84674d ("misc/pca9552: Add qom set and get") Reviewed-by: Glenn Miles Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/gpio/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/gpio/pca9552.c b/hw/gpio/pca9552.c index dd3f1536b65..472d8ad9571 100644 --- a/hw/gpio/pca9552.c +++ b/hw/gpio/pca9552.c @@ -342,7 +342,7 @@ static void pca955x_set_led(Object *obj, Visitor *v, co= nst char *name, PCA955xState *s =3D PCA955X(obj); int led, rc, reg, val; uint8_t state; - char *state_str; + g_autofree char *state_str =3D NULL; =20 if (!visit_type_str(v, name, &state_str, errp)) { return; --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531020; cv=none; d=zohomail.com; s=zohoarc; b=C93kiPVq3zTr75wiWikeSn6OeOEGzfWKgP3aHymfTLMQ4fqmXlzgVwkPy41qvGpRntSrFyMDknOgRN6kHLQVlfx7SKraE8lyMgk55ShejISNv0hE0tX2zPnSKEwbfwi8iA5Mz9YBcKxRoWw50AgziDElm1l9eAIMZNMjZ2BE6V8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531020; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OBkIAoTs+P8pcrtC4g2W8KHKDSPa9KuSS1OVvXEN4Y8=; b=WondkI6jPBBl2C7p2ER7JM5l6gPYcRQ6oog9zlelJMQJ+L77kfnNOF9pV9ps6W327A4WC1CwPAzJkDS6IB0yKhf6RXHr4tB+FvbYsp+K+QH3gNpW6EODfvtXE3Kvl5+bonu+wE0Q3v5Ub7c2sDhihwtBIrejgAPcv8m4SHYi8a0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531020540911.7600567751398; Mon, 11 May 2026 13:23:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9l-0006vF-0h; Mon, 11 May 2026 16:23:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9d-0006o7-6M for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9b-0002Ku-Bj for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:04 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-fFSzmEk1M7ugHYvKakeNAQ-1; Mon, 11 May 2026 16:22:57 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A60818005B3; Mon, 11 May 2026 20:22:55 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0366018004A3; Mon, 11 May 2026 20:22:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530982; 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=OBkIAoTs+P8pcrtC4g2W8KHKDSPa9KuSS1OVvXEN4Y8=; b=SLULoPUlU+5/KtHaiI0ipiwaze9mfze4+dRhYDDrRfeCjrj7uuiEQF+Rh1rs9IKS65NQQ/ +MqURyKpJKvzpDemXlkySbPVJpUMCqAVN9p/Jqz38OSEc2YPDhYSdEr8x2SVpYP5JfTbk2 /ycx6BbpZMXJ1bxZ6LQIW7ojZ7YGarU= X-MC-Unique: fFSzmEk1M7ugHYvKakeNAQ-1 X-Mimecast-MFC-AGG-ID: fFSzmEk1M7ugHYvKakeNAQ_1778530975 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Steven Lee , Troy Lee , Jamin Lin , Kane Chen , Andrew Jeffery , Joel Stanley , qemu-arm@nongnu.org (open list:ASPEED BMCs) Subject: [PULL 18/24] hw/arm/aspeed: free fmc_model and spi_model on finalization Date: Tue, 12 May 2026 00:21:04 +0400 Message-ID: <20260511202111.3091440-19-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531020920158500 From: Marc-Andr=C3=A9 Lureau The fmc_model and spi_model strings are allocated via g_strdup in property setters but never freed when the machine object is destroyed. Fixes: 9820e52fbef7 ("hw/arm/aspeed: Add machine properties to define the f= lash models") Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/arm/aspeed.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index a3db3406c5f..a48c4420583 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -419,12 +419,21 @@ static void aspeed_machine_class_init(ObjectClass *oc= , const void *data) aspeed_machine_class_props_init(oc); } =20 +static void aspeed_machine_instance_finalize(Object *obj) +{ + AspeedMachineState *bmc =3D ASPEED_MACHINE(obj); + + g_free(bmc->fmc_model); + g_free(bmc->spi_model); +} + static const TypeInfo aspeed_machine_types[] =3D { { .name =3D TYPE_ASPEED_MACHINE, .parent =3D TYPE_MACHINE, .instance_size =3D sizeof(AspeedMachineState), .instance_init =3D aspeed_machine_instance_init, + .instance_finalize =3D aspeed_machine_instance_finalize, .class_size =3D sizeof(AspeedMachineClass), .class_init =3D aspeed_machine_class_init, .abstract =3D true, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531049; cv=none; d=zohomail.com; s=zohoarc; b=YV+hiqx/j/L1ZBkCBQ1hZK3E34jHn0O3yCal1Xr+abAzLwW1yZSTo7W9eRioQLoGh1JH0mPweGglY8yQRShREiJOYoty4XLSpv//R95c4YNGbhB1wvozKo92XufrYoRRdg6OpBxK9R5bTT4r7afR0Oq/Be2lv2MnZWugmazqWO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531049; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WjR3LbB920EXigDkIu5RxUuwQpgi24eawYW4XfIUDz8=; b=ceLevAwKf7TQOCHd+HCUEMdG9Mmg96Z2RnmNvv7FwhwkRUm2NYez+sQkdW7mGIbIOhPX9W2xcTV7umiVUVisU/2Ukffk+wXDKrkP2xWHVm6M/mySc9/gVJHRSuDqv5QUwuGAoz7WgWdEJBNaUQwzKv5Qsl2WqgO8b4zWVtscUmI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531049154156.63594568253518; Mon, 11 May 2026 13:24:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9r-00075r-3R; Mon, 11 May 2026 16:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9i-0006uy-M9 for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9f-0002Lu-6f for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:09 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-sVr0VKRDMjuSYumLqnAxPQ-1; Mon, 11 May 2026 16:23:02 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE71319560AA; Mon, 11 May 2026 20:23:00 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 85F5830001BE; Mon, 11 May 2026 20:22:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530985; 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=WjR3LbB920EXigDkIu5RxUuwQpgi24eawYW4XfIUDz8=; b=gFAc4Kf2t6r1lwE5NeXcJ8+6+avnslZK4/cdXFlhCmy1/lcCSDyRmjBZk2PagzXT/6eehm VFZMTC2QCAQgbXTRA+Cv2queCRQ5+cN0gMy7mWTAkjKnISndiNAk5IUnkTIR3ZUUASBoiC CI5cRU9MhYvVE3WpHdu8LB450ISA+44= X-MC-Unique: sVr0VKRDMjuSYumLqnAxPQ-1 X-Mimecast-MFC-AGG-ID: sVr0VKRDMjuSYumLqnAxPQ_1778530981 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell , Leif Lindholm , qemu-arm@nongnu.org (open list:SBSA-REF) Subject: [PULL 19/24] hw/arm/sbsa-ref: free unrealized flash devices on finalization Date: Tue, 12 May 2026 00:21:05 +0400 Message-ID: <20260511202111.3091440-20-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531050263154100 From: Marc-Andr=C3=A9 Lureau Flash devices are created with qdev_new() in instance_init and added as children, but the initial reference from qdev_new() is only dropped by sysbus_realize_and_unref() during machine init. When the machine object is destroyed before realization (e.g. during qtest device introspection), the flash devices leak. Fixes: e9fdf453240e ("hw/arm: Add arm SBSA reference machine, devices part") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/arm/sbsa-ref.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 52c35e10c2d..484b90053e8 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -892,6 +892,17 @@ static void sbsa_ref_instance_init(Object *obj) sbsa_flash_create(sms); } =20 +static void sbsa_ref_instance_finalize(Object *obj) +{ + SBSAMachineState *sms =3D SBSA_MACHINE(obj); + + for (int i =3D 0; i < ARRAY_SIZE(sms->flash); i++) { + if (sms->flash[i] && !qdev_is_realized(DEVICE(sms->flash[i]))) { + object_unref(OBJECT(sms->flash[i])); + } + } +} + static void sbsa_ref_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -930,6 +941,7 @@ static const TypeInfo sbsa_ref_info =3D { .name =3D TYPE_SBSA_MACHINE, .parent =3D TYPE_MACHINE, .instance_init =3D sbsa_ref_instance_init, + .instance_finalize =3D sbsa_ref_instance_finalize, .class_init =3D sbsa_ref_class_init, .instance_size =3D sizeof(SBSAMachineState), .interfaces =3D aarch64_machine_interfaces, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531014; cv=none; d=zohomail.com; s=zohoarc; b=ZVhNzB6mM75cphK/EN7ilWkNzXF9BR8G2WVP+4+qB1zNI8XJ0IsqXabrBG290RWax5ngAt1xlt/ZYfaT5ZHZNwVV9tK2tSYaUvh4CgSRFLAdxW6Kl0hSSVOgbqDnHbkle4hvG3TwV2hqKK5Ie1OuSOy3qQI+WURVGutMuWM1xVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531014; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZQy+NU8C0RinKCdFv+xlIMSg10VBOsE5SofX/O6Ilz8=; b=fv5JIVONiIUPla+kH4B7jxQaKbptsTPup+GJVajYxrhWCbNJcjAGPl4P4s/Yl3lVzeptU6FVyVLxaeYWNrDhmdTOEKCI2956idNxWFeTcSsOnNeg7Ltos0NbWDC+rIvsBvheLgQjnun1dGWHG510O3F+gXw36eYEvwXFwiOPTcI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177853101434823.60964685558372; Mon, 11 May 2026 13:23:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9w-0007IX-Bc; Mon, 11 May 2026 16:23:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9p-00075E-Bn for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9l-0002Mc-2U for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:15 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-676-SkfVHJAdMti97mV7ht17Cw-1; Mon, 11 May 2026 16:23:07 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 378A519560B4; Mon, 11 May 2026 20:23:06 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CD6461803A8E; Mon, 11 May 2026 20:23:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530991; 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=ZQy+NU8C0RinKCdFv+xlIMSg10VBOsE5SofX/O6Ilz8=; b=MbyawPOoVQY8WfaDILd17vFmgq42Vc4vzIoKSl7eeOd0yujG4bA63xnvf1orXvIZC5Z4jw JZ359JjUFILDjQnYcIs69zJW5tsXN7jsFok8lJbHFlzTQHSKZgEHJSMl0mrHXnP40vHrbZ urTBv/3SvVW9d5PC+ivTQ2wsRWSda2s= X-MC-Unique: SkfVHJAdMti97mV7ht17Cw-1 X-Mimecast-MFC-AGG-ID: SkfVHJAdMti97mV7ht17Cw_1778530986 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell , qemu-arm@nongnu.org (open list:Virt) Subject: [PULL 20/24] hw/arm/virt: free flash devices and OEM strings on finalization Date: Tue, 12 May 2026 00:21:06 +0400 Message-ID: <20260511202111.3091440-21-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531014835158500 From: Marc-Andr=C3=A9 Lureau Flash devices created in instance_init via qdev_new() hold an extra reference that is only dropped on sysbus_realize_and_unref(). When the machine is destroyed before realization, the flash objects leak. Also, the oem_id and oem_table_id strings from g_strndup() are never freed. Fixes: 602b458201ff ("acpi: Permit OEM ID and OEM table ID fields to be cha= nged") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/arm/virt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 10b19543826..b090233893c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -4321,6 +4321,19 @@ static void virt_instance_init(Object *obj) cxl_machine_init(obj, &vms->cxl_devices_state); } =20 +static void virt_instance_finalize(Object *obj) +{ + VirtMachineState *vms =3D VIRT_MACHINE(obj); + + for (int i =3D 0; i < ARRAY_SIZE(vms->flash); i++) { + if (vms->flash[i] && !qdev_is_realized(DEVICE(vms->flash[i]))) { + object_unref(OBJECT(vms->flash[i])); + } + } + g_free(vms->oem_id); + g_free(vms->oem_table_id); +} + static const TypeInfo virt_machine_info =3D { .name =3D TYPE_VIRT_MACHINE, .parent =3D TYPE_MACHINE, @@ -4329,6 +4342,7 @@ static const TypeInfo virt_machine_info =3D { .class_size =3D sizeof(VirtMachineClass), .class_init =3D virt_machine_class_init, .instance_init =3D virt_instance_init, + .instance_finalize =3D virt_instance_finalize, .interfaces =3D (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, { } --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531048; cv=none; d=zohomail.com; s=zohoarc; b=FXiYFtDv9eiLMb7JnVjpNC5rfCRY9guO959QwJLi/p3sy336UWhoLLWOyaxU+85FFv6lGVvPnu2Y18HFxz1RfvdZmkpwOvLiqTiWxrx1DzObHw9jFZbSZp34YJU7uueb5RaqkwjRiX2FuEa682EQUEdxJr/ntlogoInNWL/hAqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531048; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8aba+qFzYsHGkPbwLo4SW8FwkLx2wbf3WzHyH/pckGA=; b=mv2589ty02wZ7BKpv4CJCAfEjdQjDrGgH0vvx/NrsvMfuqws4btk87AS7v4PSi2dh4taGeL13t0ZMjiZVSfzG0GcADNKNakCVmpXm+gou26Dg+wgxLVxi927L3zZl358im6+YaekRrmD1F4+XMH/avAtxpFZyxcIL5aAaiMKcV4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531048920447.22392094143004; Mon, 11 May 2026 13:24:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMX9y-0007JP-IG; Mon, 11 May 2026 16:23:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9q-00075J-FO for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9p-0002OA-1r for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:18 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-92-fIVp7ejzNz2kCj2RyqSC6A-1; Mon, 11 May 2026 16:23:12 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 346DC19560A1; Mon, 11 May 2026 20:23:11 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 394E63002D31; Mon, 11 May 2026 20:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778530996; 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=8aba+qFzYsHGkPbwLo4SW8FwkLx2wbf3WzHyH/pckGA=; b=iX7Kt4mcsoanSjzHTyV1Mdc9VmJonl6zzt208k7GhxhVLjzmQPr800D9jxJyJnmNSTWjsU deCY2sCKIA92HjBFVKYgrzlGnHauoZTJDNRJpd3ckj+kgEv1Lu4Q1m5UARLuwBOyq8mDBL dfnnz6oxiDUJc4UNoSA+4haH8J343dI= X-MC-Unique: fIVp7ejzNz2kCj2RyqSC6A-1 X-Mimecast-MFC-AGG-ID: fIVp7ejzNz2kCj2RyqSC6A_1778530991 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Nicholas Piggin , Aditya Gupta , Glenn Miles , qemu-ppc@nongnu.org (open list:PowerNV Non-Virt...) Subject: [PULL 21/24] hw/ppc/pnv: drop extra ref on PHB after adding as child Date: Tue, 12 May 2026 00:21:07 +0400 Message-ID: <20260511202111.3091440-22-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531050223154100 From: Marc-Andr=C3=A9 Lureau object_new() returns an object with refcount 1, and object_property_add_child() adds another reference. The initial reference must be dropped so the parent becomes the sole owner, otherwise the PHB objects leak when the chip is destroyed. Fixes: 0d512c7120a2 ("ppc/pnv: turn chip8->phbs[] into a PnvPHB* array") Reviewed-by: Glenn Miles Reviewed-by: Aditya Gupta Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/ppc/pnv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 9ed918fa6a1..8306754d9ad 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1696,6 +1696,7 @@ static void pnv_chip_power8_instance_init(Object *obj) */ object_property_add_child(obj, "phb[*]", phb); chip8->phbs[i] =3D PNV_PHB(phb); + object_unref(phb); } } =20 --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531093; cv=none; d=zohomail.com; s=zohoarc; b=bUQ4xH/0I6/ROCo8P3/zrUAwWkmD1Yu9rHRARftHMUQ9luzfIvs1yq0NHrI37IbYGq6JQPoctPZYk91XUE5n+lWnEx3leU+UBqIG29AJ9SXzD1aRmotXXTgWFSY8f8reZe0U6DkuZRb/pBLMnzff710x8xqvxbE/Ve5trl6NzsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531093; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=a135jQHbIQ62554WnpWQxBCIWQ7J2ppiEwLqVKvSLv4=; b=MYfFwWfpUHJzBKWnzimtTYLo+TVZNDK2+Ph8tPjeF2bpmAz4bJuStjPFxDuMhV1S8LuLVXOKqAqh/UJB1uSakFttbH1clYST8uLVn8Ez7quj01ybXKFUUcB0HouGdybqCac4dsTnduoax2cVw7CmROEJZTmJIYIQWDVW9HSSA3w= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531093266396.45790618313174; Mon, 11 May 2026 13:24:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMXAK-0007r6-51; Mon, 11 May 2026 16:23:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9y-0007Ps-JT for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9w-0002Uv-Ex for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:25 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-VPuSDYFbMTqZnOUd4D9rIQ-1; Mon, 11 May 2026 16:23:18 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 87787195609D; Mon, 11 May 2026 20:23:16 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4395C1800465; Mon, 11 May 2026 20:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778531003; 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=a135jQHbIQ62554WnpWQxBCIWQ7J2ppiEwLqVKvSLv4=; b=KWpWv09j6L3sKqUF+G73KGe7H0A8AePDvGlfOTIIXF+pjMiDs0nBKMv1LZT+zO/0wd+kNY mSmiX8Cl7f1JkJ/GVBwZHrh9L4ih4U5Jn0JvREbmbkIGw9DLnUZHIZZDP6zxn6Acm14bmQ /2XEcJubJEMsP271Bq6ObWORh2WOVLA= X-MC-Unique: VPuSDYFbMTqZnOUd4D9rIQ-1 X-Mimecast-MFC-AGG-ID: VPuSDYFbMTqZnOUd4D9rIQ_1778530996 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Palmer Dabbelt , Alistair Francis , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , Chao Liu , qemu-riscv@nongnu.org (open list:RISC-V TCG CPUs) Subject: [PULL 22/24] hw/riscv/virt: free flash devices and OEM strings on finalization Date: Tue, 12 May 2026 00:21:08 +0400 Message-ID: <20260511202111.3091440-23-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531093746158500 From: Marc-Andr=C3=A9 Lureau Add instance_finalize to free the two pflash devices (when unrealized) and the OEM ID strings allocated during instance_init. Fixes leaks found by ASan. Fixes: 71eb522c4063 ("riscv/virt: Add the PFlash CFI01 device") Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/riscv/virt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index a1c323e66df..315049bc86c 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1745,6 +1745,19 @@ static void virt_machine_init(MachineState *machine) qemu_add_machine_init_done_notifier(&s->machine_done); } =20 +static void virt_machine_instance_finalize(Object *obj) +{ + RISCVVirtState *s =3D RISCV_VIRT_MACHINE(obj); + + for (int i =3D 0; i < ARRAY_SIZE(s->flash); i++) { + if (s->flash[i] && !qdev_is_realized(DEVICE(s->flash[i]))) { + object_unref(OBJECT(s->flash[i])); + } + } + g_free(s->oem_id); + g_free(s->oem_table_id); +} + static void virt_machine_instance_init(Object *obj) { RISCVVirtState *s =3D RISCV_VIRT_MACHINE(obj); @@ -1984,6 +1997,7 @@ static const TypeInfo virt_machine_typeinfo =3D { .parent =3D TYPE_MACHINE, .class_init =3D virt_machine_class_init, .instance_init =3D virt_machine_instance_init, + .instance_finalize =3D virt_machine_instance_finalize, .instance_size =3D sizeof(RISCVVirtState), .interfaces =3D (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531056; cv=none; d=zohomail.com; s=zohoarc; b=PwcwM6dpjgyP2MAQK9BHa56tXw4CnKqn0gx3GNbkJgFB1BDTWdToQYvz5YHB5V+w4nJQ26j3XVBiT0BdW1wtV71DGM3kpXMaCcqIL9D4FZXPxuDv9pMWPgbOym7qv7hLffpHlmYjCir0z2Y6+Oz3SC7y8wk/yRex8QUHU8FN6Ck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531056; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OW6jNmmxpgoxgFcTM4N3eLaMcHtv/bsusbc+lVhMN9Q=; b=mT40PqVmOgrZIwCkKZSPtmXiA7Z+h94ifmdaEUIaqtTF/sXtbJVVMO+sBiLY3NWwqUWfvxIwedOptOFinWss48f2zBwYdqqlkN3ixm/fLTdLFM1Vhhlguzi6uIfli9BzLPQCmIesALfR4Csy1kOWbxbgQEjHkjPdLa/d0Y7iMiI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531056775888.0188022382956; Mon, 11 May 2026 13:24:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMXAJ-0007nE-Ba; Mon, 11 May 2026 16:23:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMXA2-0007Uk-IM for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMX9z-0002W3-8L for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:28 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-325-gRKtsDssObm61ReAYASbuQ-1; Mon, 11 May 2026 16:23:23 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 084A1195608E; Mon, 11 May 2026 20:23:22 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B81171944B0C; Mon, 11 May 2026 20:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778531006; 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=OW6jNmmxpgoxgFcTM4N3eLaMcHtv/bsusbc+lVhMN9Q=; b=BlU1iUSIcQKexrSPL7p8p0sC6Tv3WIantH7NraBo9H/4FsR4QKPV7ckUiz3bPfnIC3rHcr VIO7vtbB7o7SQHWbXGLjfRcXJwxQWhn+UTCgrN+b8AE1r625OCkBuP2PjZTeLOjIamLeps yehmh4khMChbJRE6Eb+M2v8mccOMfn0= X-MC-Unique: gRKtsDssObm61ReAYASbuQ-1 X-Mimecast-MFC-AGG-ID: gRKtsDssObm61ReAYASbuQ_1778531002 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Pierrick Bouvier Subject: [PULL 23/24] meson: drop sphinx-build < 1.7 compatiblity check Date: Tue, 12 May 2026 00:21:09 +0400 Message-ID: <20260511202111.3091440-24-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531058434154100 From: Marc-Andr=C3=A9 Lureau Since commit fe791b7fcc ("Python: bump minimum sphinx version to 3.4.3"), we no longer support building with sphinx-build < 3.4.3 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Pierrick Bouvier --- docs/meson.build | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index c3e9fb05846..a8d893681ec 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -4,24 +4,12 @@ sphinx_build =3D find_program(fs.parent(python.full_path(= )) / 'sphinx-build', # Check if tools are available to build documentation. build_docs =3D false if sphinx_build.found() - SPHINX_ARGS =3D ['env', 'CONFDIR=3D' + qemu_confdir, sphinx_build, '-q'] + SPHINX_ARGS =3D ['env', 'CONFDIR=3D' + qemu_confdir, sphinx_build, '-q',= '-j', 'auto'] # If we're making warnings fatal, apply this to Sphinx runs as well if get_option('werror') SPHINX_ARGS +=3D [ '-W', '-Dkerneldoc_werror=3D1' ] endif =20 - sphinx_version =3D run_command(SPHINX_ARGS + ['--version'], - check: true).stdout().split()[1] - if sphinx_version.version_compare('>=3D1.7.0') - SPHINX_ARGS +=3D ['-j', 'auto'] - else - nproc =3D find_program('nproc') - if nproc.found() - jobs =3D run_command(nproc, check: true).stdout() - SPHINX_ARGS +=3D ['-j', jobs] - endif - endif - # This is a bit awkward but works: create a trivial document and # try to run it with our configuration file (which enforces a # version requirement). This will fail if sphinx-build is too old. --=20 2.54.0 From nobody Sat May 30 17:45:07 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1778531056; cv=none; d=zohomail.com; s=zohoarc; b=ipUr3tV5PveLpOKrliHRxNvwR0Xg4TlC9SFvRlPgBXGULWUBANPUFjMZE0h35MmaxEThB7HBXfxExpgf5BuGvOIJtLVnZHB9SWmmXqxrNJYf7+PaCtkLCKt6eL/Otc3HEhG6ENEcvg31He6jmCfcZ6v8X97+2dMQh/Nqr5JJkyg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778531056; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6I4ISOJLTpqZetyAMA529Au/T3Q97FhNb5QDLAKB8oo=; b=Qa5sMBDucMRxn9vEAMLyw0vwpGwcNeLj0y5WNwC0jQKA+mAtM5jlptXwQmLVT8Yfj+VC/4fJsm3lB9YtMa/bVrHnrPlTn2AiRGr7YCfKoXJ266QrpQ8mF9CYADbyc9pkEVZZMI7Qz8Eu1iYNFhvQ/1isMHDJhcxj9rQi4fnhHq4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1778531056894754.3112862520312; Mon, 11 May 2026 13:24:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMXAK-0007qx-1D; Mon, 11 May 2026 16:23:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMXA8-0007Ys-8l for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wMXA6-0002X4-Sm for qemu-devel@nongnu.org; Mon, 11 May 2026 16:23:36 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-157-UQSXOARiNvSYa2CXQ9cpMQ-1; Mon, 11 May 2026 16:23:29 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A290C1800451; Mon, 11 May 2026 20:23:27 +0000 (UTC) Received: from localhost (unknown [10.44.24.4]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 37FF219560AB; Mon, 11 May 2026 20:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778531014; 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=6I4ISOJLTpqZetyAMA529Au/T3Q97FhNb5QDLAKB8oo=; b=Qer9qKdfkzE9NlzE+GwF6NIW8Rm2VWnxdCLzpJ8O3lulrT+7yeWB50JZU9xaNz/Q5+1C7Q K9bV6dlmsCP+ZNgU/SuBuUk+j6aA/xXOpLMe8vPua3VD04bO80G/9Cn6fAlutNMwmswUKG j8eDlNZRPU+4submEOi/GkYjrqvU0eQ= X-MC-Unique: UQSXOARiNvSYa2CXQ9cpMQ-1 X-Mimecast-MFC-AGG-ID: UQSXOARiNvSYa2CXQ9cpMQ_1778531007 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , Ilya Leoshkevich , David Hildenbrand , Cornelia Huck , Eric Farman , Matthew Rosato , qemu-s390x@nongnu.org (open list:S390 TCG CPUs) Subject: [PULL 24/24] target/s390x: add gen-features.h dependency to s390x_system_ss Date: Tue, 12 May 2026 00:21:10 +0400 Message-ID: <20260511202111.3091440-25-marcandre.lureau@redhat.com> In-Reply-To: <20260511202111.3091440-1-marcandre.lureau@redhat.com> References: <20260511202111.3091440-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1778531057332158500 From: Marc-Andr=C3=A9 Lureau Commit 0b83acf2f05 moved gen_features_h from s390x_ss to s390x_common_ss. However s390x_system_ss (containing ioinst.c) was left without the dependency, causing a build race: it can be compiled before gen-features.h is generated (via cpu.h -> cpu_models.h -> cpu_features.h -> gen-features.h) Add gen_features_h to s390x_system_ss to correct the build ordering. Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson sourc= e set") Acked-by: Eric Farman Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau --- target/s390x/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 44f58ac2919..bc4459e8ed7 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -26,6 +26,7 @@ s390x_common_ss.add(files( 'gdbstub.c', )) =20 +s390x_system_ss.add(gen_features_h) s390x_system_ss.add(files( 'ioinst.c', )) --=20 2.54.0