From nobody Fri Mar 27 03:30:29 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=matthewpenney.net ARC-Seal: i=1; a=rsa-sha256; t=1772746479; cv=none; d=zohomail.com; s=zohoarc; b=OWAGcqeJ4JPSD9jgC8J9AFSt34yAoleBT47c7BnX6F8Cnchwwf3Q4W7q/RLHnEnh7Be/Evz0DaVFFWhFFiwCjYEWgIm4AbJIsIrBnZULASf3loNfwPW1sDS7WjtOAUAmtmnL0WUXA6Zf8uWHaUh7d6nXr1dIN7UaD0pOyDd8Stk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772746479; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=h9d7WdkQLs54uvGRseBuRvb+sN7dCNSdLEmyOh6W2P8=; b=gBbSjIM83SFlqussyxb0W6IELbgvU7xcsxd3yvO4TuJT1+jzZINZIKXwqbAeru4ByJtVwXtnmpRr5NC/JqpTJvo+lrY//iHHVJw0TO5xYAaa3eXadYBur/zZOK8Y4FrMup/cZWDVQCBte8vSY9VtmxeHZSu+NeYm+QhQO+UFw04= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772746479386589.4585029862695; Thu, 5 Mar 2026 13:34:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vyGKM-0000rb-5e; Thu, 05 Mar 2026 16:33:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vyGKK-0000rQ-8E for qemu-devel@nongnu.org; Thu, 05 Mar 2026 16:33:48 -0500 Received: from mail-0701.mail-europe.com ([51.83.17.38] helo=mail-07.mail-europe.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vyGKH-0004kV-13 for qemu-devel@nongnu.org; Thu, 05 Mar 2026 16:33:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=matthewpenney.net; s=protonmail; t=1772746420; x=1773005620; bh=h9d7WdkQLs54uvGRseBuRvb+sN7dCNSdLEmyOh6W2P8=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=iHMb3bgEpna3DSV9iM5YTC6E+EkdSmD155yUFES9j6lZ5QUTRYuPS0WoY9krnVESM 05VuSx045z0+++FJVc0qMuZjliUREEsIZKdbonGAuN63eTINT9MdegzQEJ2gu6vr80 l5YZAAYyYnkiiOJ71/xLn02u7XCaHp7ZCOqI43uurE9Vn9Uq8AOEN0heQkjd4NmHgD sPz0MqsggvCrZXQBn1rL/Jumv7l9tYGPfqphxrWSJP+VaEdMffjTmuVpGDRPv/Fd+J tLX2HJiMOAr30m+7ezT4YQ+hDcdtz2tpJzpZIk+8OWTcCHLn0SnBtuQIJSAOvFug77 KJAX9VqxNTHzg== Date: Thu, 05 Mar 2026 21:33:32 +0000 To: qemu-devel@nongnu.org From: Matthew Penney Cc: Matthew Penney , =?utf-8?Q?Marc-Andr=C3=A9_Lureau?= , lvivier@redhat.com, amit@kernel.org, "Michael S. Tsirkin" , Paolo Bonzini Subject: [PATCH v2] hw/char: clear dangling GLib event source tag Message-ID: <20260305213308.96441-1-matt@matthewpenney.net> Feedback-ID: 185185778:user:proton X-Pm-Message-ID: ea41d04d2230d4ab7451e8eb074643f68635e9ac MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=51.83.17.38; envelope-from=matt@matthewpenney.net; helo=mail-07.mail-europe.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no 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 @matthewpenney.net) X-ZM-MESSAGEID: 1772746482254154100 Content-Type: text/plain; charset="utf-8" Clear dangling GLib event source tag when virtio-console is unrealized. This prevents a stale tag from being used, and maintains consistency with the rest of virtio-console. v2: Use g_clear_handle_id() per advice from Marc-Andr=C3=A9 Lureau Signed-off-by: Matthew Penney Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/char/virtio-console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index 25db0f019b..efe7cd6772 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -257,7 +257,7 @@ static void virtconsole_unrealize(DeviceState *dev) VirtConsole *vcon =3D VIRTIO_CONSOLE(dev); =20 if (vcon->watch) { - g_source_remove(vcon->watch); + g_clear_handle_id(&vcon->watch, g_source_remove); } } =20 --=20 2.53.0