public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH v2] hw/char: clear dangling GLib event source tag
@ 2026-03-05 21:33 Matthew Penney
  2026-03-20  9:21 ` Matthew Penney
  2026-03-24 14:43 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Matthew Penney @ 2026-03-05 21:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Matthew Penney, Marc-André Lureau, lvivier, amit,
	Michael S. Tsirkin, Paolo Bonzini

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é Lureau

Signed-off-by: Matthew Penney <matt@matthewpenney.net>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 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 = VIRTIO_CONSOLE(dev);
 
     if (vcon->watch) {
-        g_source_remove(vcon->watch);
+        g_clear_handle_id(&vcon->watch, g_source_remove);
     }
 }
 
-- 
2.53.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] hw/char: clear dangling GLib event source tag
  2026-03-05 21:33 [PATCH v2] hw/char: clear dangling GLib event source tag Matthew Penney
@ 2026-03-20  9:21 ` Matthew Penney
  2026-03-24 14:43 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Penney @ 2026-03-20  9:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Matthew Penney, Marc-André Lureau, lvivier, amit,
	Michael S. Tsirkin, Paolo Bonzini

Hi,

Just a gentle ping regarding the v2 patch I sent a couple of weeks ago.
Patchew: https://patchew.org/QEMU/20260305213308.96441-1-matt@matthewpenney.net/

Thanks for your time.

Best regards,
Matthew Penney



Sent with Proton Mail secure email.

On Thursday, 5 March 2026 at 21:33, Matthew Penney <matt@matthewpenney.net> wrote:

> 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é Lureau
> 
> Signed-off-by: Matthew Penney <matt@matthewpenney.net>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  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 = VIRTIO_CONSOLE(dev);
>  
>      if (vcon->watch) {
> -        g_source_remove(vcon->watch);
> +        g_clear_handle_id(&vcon->watch, g_source_remove);
>      }
>  }
>  
> -- 
> 2.53.0
> 
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] hw/char: clear dangling GLib event source tag
  2026-03-05 21:33 [PATCH v2] hw/char: clear dangling GLib event source tag Matthew Penney
  2026-03-20  9:21 ` Matthew Penney
@ 2026-03-24 14:43 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-24 14:43 UTC (permalink / raw)
  To: Matthew Penney, qemu-devel
  Cc: Marc-André Lureau, lvivier, amit, Michael S. Tsirkin,
	Paolo Bonzini

On 5/3/26 22:33, Matthew Penney wrote:
> 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é Lureau
> 
> Signed-off-by: Matthew Penney <matt@matthewpenney.net>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   hw/char/virtio-console.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Merged as commit 34aad589019c8687fb3b19ba79d64d97071a7205, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-24 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 21:33 [PATCH v2] hw/char: clear dangling GLib event source tag Matthew Penney
2026-03-20  9:21 ` Matthew Penney
2026-03-24 14:43 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox