From nobody Mon Feb 9 00:46:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614851310; cv=none; d=zohomail.com; s=zohoarc; b=E+FJ3+flL3ir7qnL6Gd8k8xxA2E1A8CKsCPDxkbMSZaR9f+ExX5UBJ5IG8x1YLSfVzKUwt9YF5y5dd1pRlhK/SXPQSTcXR+oxxYcI6GqCtuWEqwnp0UWCI8OhMXNPeO+ZMgH/UPUGlmjo/HVdfb0foqDJG5dwRHcHzrT/gwzuIA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614851310; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SbMaxApRMwt9yhDjVpOi9d/xgBN4wlmHatg+4OqsWNk=; b=hH/iEI5ie/XnFz+AU93wR4FtOarI3ozhcHBkvkUHHperRtasIdwENsG5+oOJveAidVNaGasgSvI/5uT/u43qfi5FvCDiLpiEkFCyttaIYBxMjtxbL8xLJRI79Ar1PPl9VQN/c1hkArnAShP6fJTQDPYX2xblSoGoYa4RwBK09MY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614851310319875.6838115837464; Thu, 4 Mar 2021 01:48:30 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-79-8ERqxNqvMCyMyi1dUAK05Q-1; Thu, 04 Mar 2021 04:48:24 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F2CDE1005D4D; Thu, 4 Mar 2021 09:48:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BD7610023B2; Thu, 4 Mar 2021 09:48:17 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 69EC24BB40; Thu, 4 Mar 2021 09:48:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1249mD86011555 for ; Thu, 4 Mar 2021 04:48:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8DACE2C6FA; Thu, 4 Mar 2021 09:48:13 +0000 (UTC) Received: from carol.localdomain (unknown [10.40.194.80]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E59C5C1C2; Thu, 4 Mar 2021 09:48:13 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id 0CE4CC20092; Thu, 4 Mar 2021 10:48:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614851308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SbMaxApRMwt9yhDjVpOi9d/xgBN4wlmHatg+4OqsWNk=; b=AkNnEPG7CqTI/pxUi9Njfy4vjKWMj+aXJ+orVK+IG4ycFKFK/0sVKGtPfll11oEYjN6NhK Abx5mNDgNoUYmsh6b8vkCoP9TssDAznxTqPLErZlKI8LkN8EYH6fx9hPmclO+NeXYvJE8a YyxqiYihmVAJzCEaWjPUr+tqnCkQ82U= X-MC-Unique: 8ERqxNqvMCyMyi1dUAK05Q-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] glib: Use safe glib event workaround in other event loops Date: Thu, 4 Mar 2021 10:48:11 +0100 Message-Id: <13c264bf81776757c56fbce62bd3f2c1d7a83517.1614851225.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Similarly to the crash workaround: commit 0db4743645b7a0611a3c0687f834205c9956f7fc Author: Daniel P. Berrang=C3=A9 Date: Tue Jul 28 16:52:47 2020 +0100 util: avoid crash due to race in glib event loop code we need to do this in the other event loop as crash in that one was also reported: https://bugzilla.redhat.com/show_bug.cgi?id=3D1931331 Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_agent.c | 2 +- src/qemu/qemu_monitor.c | 2 +- src/util/vireventthread.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c index 9a74b802b89d..8b880d0d157c 100644 --- a/src/qemu/qemu_agent.c +++ b/src/qemu/qemu_agent.c @@ -533,7 +533,7 @@ qemuAgentUnregister(qemuAgentPtr agent) { if (agent->watch) { g_source_destroy(agent->watch); - g_source_unref(agent->watch); + g_vir_source_unref_safe(agent->watch); agent->watch =3D NULL; } } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 73f337a6be53..b4f2641504f8 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -862,7 +862,7 @@ qemuMonitorUnregister(qemuMonitorPtr mon) { if (mon->watch) { g_source_destroy(mon->watch); - g_source_unref(mon->watch); + g_vir_source_unref_safe(mon->watch); mon->watch =3D NULL; } } diff --git a/src/util/vireventthread.c b/src/util/vireventthread.c index 8342f420f666..e9d18d3acf2f 100644 --- a/src/util/vireventthread.c +++ b/src/util/vireventthread.c @@ -123,7 +123,7 @@ virEventThreadWorker(void *opaque) =20 g_main_loop_run(data->loop); =20 - g_source_unref(running); + g_vir_source_unref_safe(running); virEventThreadDataFree(data); =20 return NULL; --=20 2.30.1